1 import { Response } from 'express'
2 import { AbuseModel } from '@server/models/abuse/abuse'
3 import { HttpStatusCode } from '@shared/models'
4 import { forceNumber } from '@shared/core-utils'
6 async function doesAbuseExist (abuseId: number | string, res: Response) {
7 const abuse = await AbuseModel.loadByIdWithReporter(forceNumber(abuseId))
11 status: HttpStatusCode.NOT_FOUND_404,
12 message: 'Abuse not found'
18 res.locals.abuse = abuse
22 // ---------------------------------------------------------------------------