]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/middlewares/video-blacklists.ts
replace numbers with typed http status codes (#3409)
[github/Chocobozzz/PeerTube.git] / server / helpers / middlewares / video-blacklists.ts
index c79420a0c08a05dea8edbeba24ece1fa3945944b..eda1324d3f350707eff6e4d55fd5025fd923f059 100644 (file)
@@ -1,11 +1,12 @@
 import { Response } from 'express'
 import { VideoBlacklistModel } from '../../models/video/video-blacklist'
+import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
 
 async function doesVideoBlacklistExist (videoId: number, res: Response) {
   const videoBlacklist = await VideoBlacklistModel.loadByVideoId(videoId)
 
   if (videoBlacklist === null) {
-    res.status(404)
+    res.status(HttpStatusCode.NOT_FOUND_404)
        .json({ error: 'Blacklisted video not found' })
        .end()