Revert "Add missing admin action files and navigation links"

This reverts commit 41be6835bf.
This commit is contained in:
Simo committed 2026-07-11 20:37:56 +02:00
1 parent 4a1e1115b3
commit 4d515bc400
338 files changed
+5949 -28144

No files matched your search

+27 -37
View File
@@ -306,29 +306,20 @@ const METHOD_CLASS: Record<Method, string> = {
function AuthTag({ endpoint }: { endpoint: Endpoint }) {
if (endpoint.bearer) {
return (
<span
className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]"
title="Requires Authorization: Bearer <token>"
>
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]" title="Requires Authorization: Bearer <token>">
🔒 Bearer
</span>
);
}
if (endpoint.session) {
return (
<span
className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]"
title="Requires a signed-in web session"
>
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]" title="Requires a signed-in web session">
🔒 Session
</span>
);
}
return (
<span
className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-green-600/20 text-[var(--color-text)]"
title="No authentication required"
>
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-green-600/20 text-[var(--color-text)]" title="No authentication required">
Public
</span>
);
@@ -351,7 +342,8 @@ function EndpointRow({ endpoint }: { endpoint: Endpoint }) {
display: "inline-flex",
alignItems: "center",
gap: "0.5rem",
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace",
fontFamily:
"ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace",
fontSize: "0.85rem",
background: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
border: "1px solid var(--border-subtle)",
@@ -362,11 +354,7 @@ function EndpointRow({ endpoint }: { endpoint: Endpoint }) {
overflowX: "auto",
}}
>
<span
className={`inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full ${METHOD_CLASS[endpoint.method]}`}
>
{endpoint.method}
</span>
<span className={`inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full ${METHOD_CLASS[endpoint.method]}`}>{endpoint.method}</span>
<span>{endpoint.path}</span>
</code>
<span className="muted" style={{ flex: "1 1 14rem", minWidth: "12rem" }}>
@@ -388,9 +376,9 @@ export default function DevelopersPage() {
subtitle={`A public REST API over the hotel — ${totalEndpoints} endpoints across ${GROUPS.length} groups.`}
>
<p className="muted" style={{ margin: 0 }}>
All endpoints live under <code>/api</code> and return JSON. Most read endpoints are open; a handful
that touch your account need a token. Browse the groups below — each row shows the method, path,
what it does and whether it needs authentication.
All endpoints live under <code>/api</code> and return JSON. Most read endpoints are open;
a handful that touch your account need a token. Browse the groups below — each row shows
the method, path, what it does and whether it needs authentication.
</p>
</ContentCard>
@@ -398,15 +386,14 @@ export default function DevelopersPage() {
<div style={{ display: "grid", gap: "0.75rem" }}>
<p className="muted" style={{ margin: 0 }}>
Most reads are <strong>open</strong> and need no credentials. Endpoints marked{" "}
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]">
🔒 Bearer
</span>{" "}
require a personal access token sent in the request header:
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]">🔒 Bearer</span> require a personal access token sent in
the request header:
</p>
<code
style={{
display: "block",
fontFamily: "ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace",
fontFamily:
"ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace",
fontSize: "0.85rem",
background: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
border: "1px solid var(--border-subtle)",
@@ -419,24 +406,27 @@ export default function DevelopersPage() {
Authorization: Bearer &lt;your-token&gt;
</code>
<p className="muted" style={{ margin: 0 }}>
To get a token, sign in to the website and <code>POST</code> to <code>/api/tokens</code> — the
plaintext token is returned <strong>once</strong> and never shown again, so store it safely. You
can list and revoke your tokens at <code>/api/me/tokens</code>. These token-management endpoints
are marked{" "}
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]">
🔒 Session
</span>{" "}
because they use your signed-in web session rather than a Bearer token.
To get a token, sign in to the website and{" "}
<code>POST</code> to <code>/api/tokens</code> — the plaintext token is returned{" "}
<strong>once</strong> and never shown again, so store it safely. You can list and revoke
your tokens at <code>/api/me/tokens</code>. These token-management endpoints are marked{" "}
<span className="inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full bg-[var(--color-primary)]/18 text-[var(--color-text)]">🔒 Session</span> because they use your signed-in web
session rather than a Bearer token.
</p>
<p className="muted" style={{ margin: 0 }}>
Tokens are tied to your account: Bearer endpoints only ever return or modify your own data (your
tickets, your shouts, your DJ points).
Tokens are tied to your account: Bearer endpoints only ever return or modify your own
data (your tickets, your shouts, your DJ points).
</p>
</div>
</ContentCard>
{GROUPS.map((group) => (
<ContentCard key={group.title} icon={group.icon} title={group.title} subtitle={group.subtitle}>
<ContentCard
key={group.title}
icon={group.icon}
title={group.title}
subtitle={group.subtitle}
>
<div style={{ display: "grid" }}>
{group.endpoints.map((endpoint) => (
<EndpointRow key={`${endpoint.method} ${endpoint.path}`} endpoint={endpoint} />