fix(api): move swagger to /api group to prevent double prefixing

This commit is contained in:
2026-04-01 15:29:26 +08:00
parent 3cd6fcbd81
commit a3940321a7

View File

@@ -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)