From b998826b7118617740816fbc3e0470afc31e45a7 Mon Sep 17 00:00:00 2001 From: asepharyana Date: Thu, 20 Aug 2026 13:08:35 +0700 Subject: [PATCH] chore: remove stale docs/create route (using /create instead) --- apps/web/app/docs/create/page.tsx | 49 ------------------------------- 1 file changed, 49 deletions(-) delete mode 100644 apps/web/app/docs/create/page.tsx diff --git a/apps/web/app/docs/create/page.tsx b/apps/web/app/docs/create/page.tsx deleted file mode 100644 index b1d4155..0000000 --- a/apps/web/app/docs/create/page.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import { WEBHOOK_SECRET } from "@mcpedia/config"; -import { cookies } from "next/headers"; -import DocForm from "@/components/DocForm"; -import Link from "next/link"; - -// GET /docs/create — show the create form. -// Auth: requires the mcpedia_admin cookie (set via /api/auth/login). -export default async function CreateDocPage({ - searchParams, -}: { - searchParams: Promise<{ slug?: string; section?: string }>; -}) { - const params = await searchParams; - const section = - (params.section as "docs" | "writeups" | "research" | "notes") ?? "docs"; - const slug = params.slug ?? ""; - - // Auth check: cookie must be present. - const cookieStore = await cookies(); - const adminCookie = cookieStore.get("mcpedia_admin"); - if (!adminCookie?.value) { - return ( -
-

Authentication required

-

- You must be logged in to create documents. -

- - Login - -
- ); - } - - return ( -
-

Create Document

- -
- ); -}