From 76854fe23b9a8c1e8b08ccc8ad0b6dd628382adb Mon Sep 17 00:00:00 2001 From: imbytecat Date: Tue, 12 May 2026 01:09:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(api):=20=E7=A6=81=E7=94=A8=E6=9C=AA?= =?UTF-8?q?=E5=90=AF=E7=94=A8=E7=9A=84=20OpenAPI=20=E7=AB=AF=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/api/$.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/api/$.ts b/src/routes/api/$.ts index 5f5a3a0..806912a 100644 --- a/src/routes/api/$.ts +++ b/src/routes/api/$.ts @@ -33,6 +33,8 @@ export const Route = createFileRoute('/api/$')({ server: { handlers: { ANY: async ({ request }) => { + if (!env.ENABLE_API_DOCS) return new Response('Not Found', { status: 404 }) + const { response } = await handler.handle(request, { prefix: '/api', context: {