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");
|
throw new Error("WIBU_UPLOAD_DIR is not defined");
|
||||||
|
|
||||||
const ApiServer = new Elysia()
|
const ApiServer = new Elysia()
|
||||||
.use(
|
|
||||||
swagger({
|
|
||||||
path: "/api/docs",
|
|
||||||
documentation: {
|
|
||||||
info: {
|
|
||||||
title: "Desa Darmasaba API Documentation",
|
|
||||||
version: "1.0.0",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
.use(
|
.use(
|
||||||
staticPlugin({
|
staticPlugin({
|
||||||
assets: UPLOAD_DIR,
|
assets: UPLOAD_DIR,
|
||||||
@@ -110,6 +99,17 @@ const ApiServer = new Elysia()
|
|||||||
})
|
})
|
||||||
.group("/api", (app) =>
|
.group("/api", (app) =>
|
||||||
app
|
app
|
||||||
|
.use(
|
||||||
|
swagger({
|
||||||
|
path: "/docs",
|
||||||
|
documentation: {
|
||||||
|
info: {
|
||||||
|
title: "Desa Darmasaba API Documentation",
|
||||||
|
version: "1.0.0",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
)
|
||||||
.use(Utils)
|
.use(Utils)
|
||||||
.use(FileStorage)
|
.use(FileStorage)
|
||||||
.use(LandingPage)
|
.use(LandingPage)
|
||||||
|
|||||||
Reference in New Issue
Block a user