diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-07 14:32:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 14:32:36 +0100 |
commit | 2d53be0267acc49cda46707b885096193a1f4e9c (patch) | |
tree | 887061a34bc67f40acbb96a6278f9544bf83caeb /server/helpers/middlewares/video-blacklists.ts | |
parent | adc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff) | |
download | PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip |
replace numbers with typed http status codes (#3409)
Diffstat (limited to 'server/helpers/middlewares/video-blacklists.ts')
-rw-r--r-- | server/helpers/middlewares/video-blacklists.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ | |||
1 | import { Response } from 'express' | 1 | import { Response } from 'express' |
2 | import { VideoBlacklistModel } from '../../models/video/video-blacklist' | 2 | import { VideoBlacklistModel } from '../../models/video/video-blacklist' |
3 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
3 | 4 | ||
4 | async function doesVideoBlacklistExist (videoId: number, res: Response) { | 5 | async function doesVideoBlacklistExist (videoId: number, res: Response) { |
5 | const videoBlacklist = await VideoBlacklistModel.loadByVideoId(videoId) | 6 | const videoBlacklist = await VideoBlacklistModel.loadByVideoId(videoId) |
6 | 7 | ||
7 | if (videoBlacklist === null) { | 8 | if (videoBlacklist === null) { |
8 | res.status(404) | 9 | res.status(HttpStatusCode.NOT_FOUND_404) |
9 | .json({ error: 'Blacklisted video not found' }) | 10 | .json({ error: 'Blacklisted video not found' }) |
10 | .end() | 11 | .end() |
11 | 12 | ||