check,auth

This commit is contained in:
Alex Holliday committed 2026-03-20 11:52:53 -07:00
1 parent 7456609e35
commit 7144c20c5b
3 files changed
+16 -5

No files matched your search

+10 -1
View File
@@ -12,7 +12,16 @@ import { requireTeamId } from "@/controllers/controllerUtils.js";
const SERVICE_NAME = "checkController";
class CheckController {
export interface ICheckController {
serviceName: string;
getChecksByMonitor: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
getChecksByTeam: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
getChecksSummaryByTeamId: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
deleteChecks: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
deleteChecksByTeamId: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
}
class CheckController implements ICheckController {
static SERVICE_NAME = SERVICE_NAME;
private checkService: ICheckService;
+3 -2
View File
@@ -1,14 +1,15 @@
import { Router, RequestHandler } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
import multer from "multer";
import { IAuthController } from "@/controllers/authController.js";
const upload = multer();
class AuthRoutes {
private router: Router;
private authController: any;
private authController: IAuthController;
constructor(authController: any, verifyJWT: RequestHandler) {
constructor(authController: IAuthController, verifyJWT: RequestHandler) {
this.router = Router();
this.authController = authController;
this.initRoutes(verifyJWT);
+3 -2
View File
@@ -1,12 +1,13 @@
import { Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
import { ICheckController } from "@/controllers/checkController.js";
class CheckRoutes {
private router: Router;
private checkController: any;
private checkController: ICheckController;
constructor(checkController: any) {
constructor(checkController: ICheckController) {
this.router = Router();
this.checkController = checkController;
this.initRoutes();