routes -> ts

This commit is contained in:
Alex Holliday committed 2026-01-21 10:36:03 -08:00
1 parent 35488fed3e
commit 81c7c992e2
13 files changed
+74 -42

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
class SettingsRoutes {
private router: Router;
private settingsController: any;
constructor(settingsController: any) {
this.router = Router();
this.settingsController = settingsController;
this.initRoutes();
}
initRoutes() {
this.router.get("/", this.settingsController.getAppSettings);
this.router.put("/", isAllowed(["admin", "superadmin"]), this.settingsController.updateAppSettings);
this.router.post("/test-email", isAllowed(["admin", "superadmin"]), this.settingsController.sendTestEmail);
}
getRouter() {
return this.router;
}
}
export default SettingsRoutes;