purge incident module

This commit is contained in:
Alex Holliday committed 2026-01-22 21:28:28 +00:00
1 parent 5292ca8988
commit d25ca473de
8 files changed
+63 -544

No files matched your search

+7 -4
View File
@@ -66,10 +66,13 @@ class IncidentController {
getIncidentById = async (req: Request, res: Response, next: NextFunction) => {
try {
const incident = await this.incidentService.getIncidentById({
incidentId: req?.params?.incidentId,
teamId: req?.user?.teamId,
});
const teamId = requireTeamId(req.user?.teamId);
const incidentId = req.params.incidentId;
if (!incidentId) {
throw new AppError({ message: "Incident ID is required", service: SERVICE_NAME, status: 400 });
}
const incident = await this.incidentService.getIncidentById(incidentId, teamId);
return res.status(200).json({
success: true,