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

+28
View File
@@ -0,0 +1,28 @@
import { Router } from "express";
class MaintenanceWindowRoutes {
private router: Router;
private mwController: any;
constructor(maintenanceWindowController: any) {
this.router = Router();
this.mwController = maintenanceWindowController;
this.initRoutes();
}
initRoutes() {
this.router.post("/", this.mwController.createMaintenanceWindows);
this.router.get("/team/", this.mwController.getMaintenanceWindowsByTeamId);
this.router.get("/monitor/:monitorId", this.mwController.getMaintenanceWindowsByMonitorId);
this.router.get("/:id", this.mwController.getMaintenanceWindowById);
this.router.put("/:id", this.mwController.editMaintenanceWindow);
this.router.delete("/:id", this.mwController.deleteMaintenanceWindow);
}
getRouter() {
return this.router;
}
}
export default MaintenanceWindowRoutes;