From aa3f96ef2dbb6fdfd401e71e1cd1eea3f37614a0 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Wed, 17 Jun 2026 13:28:43 +0700 Subject: [PATCH] refactor: merge /test into /docs, serve test-api.html publicly Both /docs and /test now serve the API test console (public/test-api.html), replacing the old inline docs page. Co-Authored-By: Claude --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index bf37020..9d7b930 100644 --- a/src/index.ts +++ b/src/index.ts @@ -465,8 +465,7 @@ const server: Server = Bun.serve({ // Static routes if (url.pathname === "/health") return handleHealth(); - if (url.pathname === "/docs") return handleDocs(); - if (url.pathname === "/test") { + if (url.pathname === "/docs" || url.pathname === "/test") { const file = Bun.file("public/test-api.html"); const exists = await file.exists(); return new Response(exists ? file : "Not found", {