mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 07:05:03 +00:00
fix: api routes didn't use the API_PATH_PREFIX
router
This commit is contained in:
parent
b28ca170ed
commit
7252aa1984
1 changed files with 5 additions and 5 deletions
|
@ -28,11 +28,6 @@ app.use(multer().none());
|
||||||
|
|
||||||
const rootRouter = express.Router();
|
const rootRouter = express.Router();
|
||||||
|
|
||||||
initAuth(app);
|
|
||||||
initGuildsAPI(app);
|
|
||||||
initArchives(app);
|
|
||||||
initDocs(app);
|
|
||||||
|
|
||||||
// Default route
|
// Default route
|
||||||
rootRouter.get("/", (req, res) => {
|
rootRouter.get("/", (req, res) => {
|
||||||
res.json({ status: "cookies", with: "milk" });
|
res.json({ status: "cookies", with: "milk" });
|
||||||
|
@ -40,6 +35,11 @@ rootRouter.get("/", (req, res) => {
|
||||||
|
|
||||||
app.use(apiPathPrefix, rootRouter);
|
app.use(apiPathPrefix, rootRouter);
|
||||||
|
|
||||||
|
initAuth(rootRouter);
|
||||||
|
initGuildsAPI(rootRouter);
|
||||||
|
initArchives(rootRouter);
|
||||||
|
initDocs(rootRouter);
|
||||||
|
|
||||||
// Error response
|
// Error response
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
app.use((err, req, res, next) => {
|
app.use((err, req, res, next) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue