1 import { Response } from 'express'
2 import { AbuseModel } from '@server/models/abuse/abuse'
3 import { HttpStatusCode } from '@shared/models'
5 async function doesAbuseExist (abuseId: number | string, res: Response) {
6 const abuse = await AbuseModel.loadByIdWithReporter(parseInt(abuseId + '', 10))
10 status: HttpStatusCode.NOT_FOUND_404,
11 message: 'Abuse not found'
17 res.locals.abuse = abuse
21 // ---------------------------------------------------------------------------