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:
+1
-2
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user