From 7252aa1984d4bb8f95b1758df93c1395a77875e0 Mon Sep 17 00:00:00 2001 From: Ruby Date: Wed, 8 May 2024 18:25:28 +0200 Subject: [PATCH] fix: api routes didn't use the `API_PATH_PREFIX` router --- backend/src/api/start.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/api/start.ts b/backend/src/api/start.ts index 088c8ba97..bae69da39 100644 --- a/backend/src/api/start.ts +++ b/backend/src/api/start.ts @@ -28,11 +28,6 @@ app.use(multer().none()); const rootRouter = express.Router(); -initAuth(app); -initGuildsAPI(app); -initArchives(app); -initDocs(app); - // Default route rootRouter.get("/", (req, res) => { res.json({ status: "cookies", with: "milk" }); @@ -40,6 +35,11 @@ rootRouter.get("/", (req, res) => { app.use(apiPathPrefix, rootRouter); +initAuth(rootRouter); +initGuildsAPI(rootRouter); +initArchives(rootRouter); +initDocs(rootRouter); + // Error response // eslint-disable-next-line @typescript-eslint/no-unused-vars app.use((err, req, res, next) => {