fix(app): required auth was in wrong spot caused entire app to want you logged in
This commit is contained in:
@@ -3,16 +3,14 @@ import { requireAuth } from "../middleware/auth.middleware.js";
|
||||
|
||||
import build from "./admin.build.js";
|
||||
import update from "./admin.updateServer.js";
|
||||
import users from "./admin.users.js";
|
||||
|
||||
export const setupAdminRoutes = (baseUrl: string, app: Express) => {
|
||||
//stats will be like this as we dont need to change this
|
||||
app.use(`${baseUrl}/api/admin/build`, requireAuth, build);
|
||||
app.use(
|
||||
`${baseUrl}/api/admin/build`,
|
||||
requireAuth,
|
||||
|
||||
update,
|
||||
);
|
||||
app.use(`${baseUrl}/api/admin/build`, requireAuth, build);
|
||||
app.use(`${baseUrl}/api/admin/build`, requireAuth, update);
|
||||
app.use(`${baseUrl}/api/admin/user`, requireAuth, users);
|
||||
|
||||
// all other system should be under /api/system/*
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user