add log cache, routes, and controller

This commit is contained in:
Alex Holliday committed 2025-06-23 11:25:42 +08:00
1 parent 34485a0cae
commit 0b6febbb82
4 files changed
+93 -10

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import { Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
class LogRoutes {
constructor(logController) {
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;