invite, inident
This commit is contained in:
1 parent
332300dde4
commit
80f3168837
4 files changed
+21
-6
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user