Files
Checkmate/server/routes/settingsRoute.js
T

30 lines
645 B
JavaScript
Raw Normal View History

2025-04-20 11:29:53 -07:00
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(
"/",
2025-04-25 10:20:42 -07:00
isAllowed(["admin", "superadmin"]),
2025-04-20 11:29:53 -07:00
this.settingsController.updateAppSettings
);
2025-05-16 15:01:34 -07:00
this.router.post(
"/test-email",
isAllowed(["admin", "superadmin"]),
this.settingsController.sendTestEmail
);
2025-04-20 11:29:53 -07:00
}
getRouter() {
return this.router;
}
}
export default SettingsRoutes;