From a3940321a78a422fe68d3041af4f5111e917475b Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 1 Apr 2026 15:29:26 +0800 Subject: [PATCH] fix(api): move swagger to /api group to prevent double prefixing --- src/app/api/[[...slugs]]/route.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/api/[[...slugs]]/route.ts b/src/app/api/[[...slugs]]/route.ts index f477058f..16b0f923 100644 --- a/src/app/api/[[...slugs]]/route.ts +++ b/src/app/api/[[...slugs]]/route.ts @@ -82,17 +82,6 @@ if (!process.env.WIBU_UPLOAD_DIR) throw new Error("WIBU_UPLOAD_DIR is not defined"); const ApiServer = new Elysia() - .use( - swagger({ - path: "/api/docs", - documentation: { - info: { - title: "Desa Darmasaba API Documentation", - version: "1.0.0", - }, - }, - }), - ) .use( staticPlugin({ assets: UPLOAD_DIR, @@ -110,6 +99,17 @@ const ApiServer = new Elysia() }) .group("/api", (app) => app + .use( + swagger({ + path: "/docs", + documentation: { + info: { + title: "Desa Darmasaba API Documentation", + version: "1.0.0", + }, + }, + }), + ) .use(Utils) .use(FileStorage) .use(LandingPage)