X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fmiddlewares%2Fvideo-blacklists.ts;h=eda1324d3f350707eff6e4d55fd5025fd923f059;hb=2d53be0267acc49cda46707b885096193a1f4e9c;hp=c79420a0c08a05dea8edbeba24ece1fa3945944b;hpb=adc1f09c0dbd997f34028c1c82d1c118dc8ead80;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/middlewares/video-blacklists.ts b/server/helpers/middlewares/video-blacklists.ts index c79420a0c..eda1324d3 100644 --- a/server/helpers/middlewares/video-blacklists.ts +++ b/server/helpers/middlewares/video-blacklists.ts @@ -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()