fix(api): move swagger to /api group to prevent double prefixing
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user