invite, inident

This commit is contained in:
Alex Holliday committed 2026-03-20 11:50:47 -07:00
1 parent 332300dde4
commit 80f3168837
4 files changed
+21 -6

No files matched your search

+8 -1
View File
@@ -5,7 +5,14 @@ import { IIncidentService } from "@/service/index.js";
import { getIncidentsByTeamQueryValidation, getIncidentSummaryQueryValidation } from "@/validation/incidentValidation.js";
const SERVICE_NAME = "IncidentController";
class IncidentController {
export interface IIncidentController {
getIncidentsByTeam: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
getIncidentSummary: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
getIncidentById: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
resolveIncidentManually: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
}
class IncidentController implements IIncidentController {
private incidentService: IIncidentService;
constructor(incidentService: IIncidentService) {
this.incidentService = incidentService;
+7 -1
View File
@@ -4,7 +4,13 @@ import { requireFirstName, requireTeamId, requireUserRoles } from "@/controllers
import { IInviteService } from "@/service/index.js";
const SERVICE_NAME = "inviteController";
class InviteController {
export interface IInviteController {
getInviteToken: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
sendInviteEmail: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
verifyInviteToken: (req: Request, res: Response, next: NextFunction) => Promise<Response | void>;
}
class InviteController implements IInviteController {
static SERVICE_NAME = SERVICE_NAME;
private inviteService: IInviteService;
constructor(inviteService: IInviteService) {
+3 -2
View File
@@ -1,11 +1,12 @@
import { Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
import { IIncidentController } from "@/controllers/incidentController.js";
class IncidentRoutes {
private router: Router;
private incidentController: any;
private incidentController: IIncidentController;
constructor(incidentController: any) {
constructor(incidentController: IIncidentController) {
this.router = Router();
this.incidentController = incidentController;
this.initRoutes();
+3 -2
View File
@@ -1,11 +1,12 @@
import { RequestHandler, Router } from "express";
import { isAllowed } from "../middleware/isAllowed.js";
import { IInviteController } from "@/controllers/inviteController.js";
class InviteRoutes {
private router: Router;
private inviteController: any;
private inviteController: IInviteController;
constructor(inviteController: any, verifyJWT: RequestHandler) {
constructor(inviteController: IInviteController, verifyJWT: RequestHandler) {
this.router = Router();
this.inviteController = inviteController;
this.initRoutes(verifyJWT);