remove service regsitry, remove unused middleware

This commit is contained in:
Alex Holliday committed 2026-01-20 22:40:06 +00:00
1 parent f03ded4109
commit 44079f2eb8
14 files changed
+96 -265

No files matched your search

+3 -4
View File
@@ -1,18 +1,17 @@
import { Router } from "express";
import { verifyJWT } from "../../middleware/v1/verifyJWT.js";
import { isAllowed } from "../../middleware/v1/isAllowed.js";
import multer from "multer";
const upload = multer();
class AuthRoutes {
constructor(authController) {
constructor(authController, verifyJWT) {
this.router = Router();
this.authController = authController;
this.initRoutes();
this.initRoutes(verifyJWT);
}
initRoutes() {
initRoutes(verifyJWT) {
this.router.post("/register", upload.single("profileImage"), this.authController.registerUser);
this.router.post("/login", this.authController.loginUser);
+4 -4
View File
@@ -1,14 +1,14 @@
import { Router } from "express";
import { verifyJWT } from "../../middleware/v1/verifyJWT.js";
import { isAllowed } from "../../middleware/v1/isAllowed.js";
class DiagnosticRoutes {
constructor(diagnosticController) {
constructor(diagnosticController, verifyJWT) {
this.router = Router();
this.diagnosticController = diagnosticController;
this.initRoutes();
this.initRoutes(verifyJWT);
}
initRoutes() {
initRoutes(verifyJWT) {
this.router.get("/system", verifyJWT, isAllowed(["admin", "superadmin"]), this.diagnosticController.getSystemStats);
}
+3 -4
View File
@@ -1,15 +1,14 @@
import { Router } from "express";
import { verifyJWT } from "../../middleware/v1/verifyJWT.js";
import { isAllowed } from "../../middleware/v1/isAllowed.js";
class InviteRoutes {
constructor(inviteController) {
constructor(inviteController, verifyJWT) {
this.router = Router();
this.inviteController = inviteController;
this.initRoutes();
this.initRoutes(verifyJWT);
}
initRoutes() {
initRoutes(verifyJWT) {
this.router.post("/send", verifyJWT, isAllowed(["admin", "superadmin"]), this.inviteController.sendInviteEmail);
this.router.post("/verify", this.inviteController.verifyInviteToken);
this.router.post("/", verifyJWT, isAllowed(["admin", "superadmin"]), this.inviteController.getInviteToken);
+3 -4
View File
@@ -1,16 +1,15 @@
import { Router } from "express";
import { verifyJWT } from "../../middleware/v1/verifyJWT.js";
import multer from "multer";
const upload = multer();
class StatusPageRoutes {
constructor(statusPageController) {
constructor(statusPageController, verifyJWT) {
this.router = Router();
this.statusPageController = statusPageController;
this.initRoutes();
this.initRoutes(verifyJWT);
}
initRoutes() {
initRoutes(verifyJWT) {
this.router.get("/", this.statusPageController.getStatusPage);
this.router.get("/team", verifyJWT, this.statusPageController.getStatusPagesByTeamId);