mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-25 11:19:16 -06:00
26 lines
522 B
JavaScript
Executable File
26 lines
522 B
JavaScript
Executable File
import { Router } from "express";
|
|
import { isAllowed } from "../middleware/isAllowed.js";
|
|
|
|
class SettingsRoutes {
|
|
constructor(settingsController) {
|
|
this.router = Router();
|
|
this.settingsController = settingsController;
|
|
this.initRoutes();
|
|
}
|
|
|
|
initRoutes() {
|
|
this.router.get("/", this.settingsController.getAppSettings);
|
|
this.router.put(
|
|
"/",
|
|
isAllowed(["admin", "superadmin"]),
|
|
this.settingsController.updateAppSettings
|
|
);
|
|
}
|
|
|
|
getRouter() {
|
|
return this.router;
|
|
}
|
|
}
|
|
|
|
export default SettingsRoutes;
|