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 <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-17 13:28:43 +07:00
co-authored by Claude
parent e4406b586e
commit aa3f96ef2d
+1 -2
View File
@@ -465,8 +465,7 @@ const server: Server<WSRelayData> = Bun.serve<WSRelayData>({
// 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", {