Files
Checkmate/server/src/routes/logRoutes.ts
T

22 lines
549 B
TypeScript
Raw Normal View History

2025-06-23 11:25:42 +08:00
import { Router } from "express";
2026-03-20 11:48:58 -07:00
import { isAllowed } from "@/middleware/isAllowed.js";
import { ILogController } from "@/controllers/logController.js";
2025-06-23 11:25:42 +08:00
class LogRoutes {
2026-01-21 10:36:03 -08:00
private router: Router;
2026-03-20 11:48:58 -07:00
private logController: ILogController;
2026-01-21 10:36:03 -08:00
2026-03-20 11:48:58 -07:00
constructor(logController: ILogController) {
2025-06-23 11:25:42 +08:00
this.router = Router();
this.logController = logController;
this.initRoutes();
}
initRoutes() {
this.router.get("/", isAllowed(["admin", "superadmin"]), this.logController.getLogs);
}
getRouter() {
return this.router;
}
}
export default LogRoutes;