]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/middlewares/abuses.ts
Fix preview upload with capitalized ext
[github/Chocobozzz/PeerTube.git] / server / helpers / middlewares / abuses.ts
index 59ba0d3ed26df34d8eedd9a63e5f31c24284a47f..c53bd9efd9af211bd45709b4ab771df7c1e39bbe 100644 (file)
@@ -1,11 +1,12 @@
 import { Response } from 'express'
 import { AbuseModel } from '../../models/abuse/abuse'
+import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
 
 async function doesAbuseExist (abuseId: number | string, res: Response) {
   const abuse = await AbuseModel.loadByIdWithReporter(parseInt(abuseId + '', 10))
 
   if (!abuse) {
-    res.status(404)
+    res.status(HttpStatusCode.NOT_FOUND_404)
        .json({ error: 'Abuse not found' })
 
     return false