fix(contorller): env corrections on where to look for the file when running
This commit is contained in:
@@ -4,6 +4,8 @@ import { requireAuth } from "../../pkg/middleware/authMiddleware.js";
|
||||
//admin routes
|
||||
import users from "./routes/getUserRoles.js";
|
||||
import grantRoles from "./routes/grantRole.js";
|
||||
import servers from "./routes/servers/serverRoutes.js";
|
||||
import { restrictToHosts } from "../../pkg/middleware/restrictToHosts.js";
|
||||
|
||||
export const setupAdminRoutes = (app: Express, basePath: string) => {
|
||||
app.use(
|
||||
@@ -16,4 +18,11 @@ export const setupAdminRoutes = (app: Express, basePath: string) => {
|
||||
requireAuth("user", ["systemAdmin", "admin"]), // will pass bc system admin but this is just telling us we need this
|
||||
grantRoles
|
||||
);
|
||||
|
||||
app.use(
|
||||
basePath + "/api/admin/server",
|
||||
requireAuth("user", ["systemAdmin", "admin"]), // will pass bc system admin but this is just telling us we need this
|
||||
restrictToHosts(["usmcd1vms036", "USMCD1VMS036"]), // what servers are allowed to see the server section
|
||||
servers
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user