aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/blacklist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/blacklist.ts')
-rw-r--r--server/controllers/api/videos/blacklist.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts
index 3b25ceea2..fa8448c86 100644
--- a/server/controllers/api/videos/blacklist.ts
+++ b/server/controllers/api/videos/blacklist.ts
@@ -18,6 +18,7 @@ import {
18 videosBlacklistUpdateValidator 18 videosBlacklistUpdateValidator
19} from '../../../middlewares' 19} from '../../../middlewares'
20import { VideoBlacklistModel } from '../../../models/video/video-blacklist' 20import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
21import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
21 22
22const blacklistRouter = express.Router() 23const blacklistRouter = express.Router()
23 24
@@ -69,7 +70,7 @@ async function addVideoToBlacklistController (req: express.Request, res: express
69 70
70 logger.info('Video %s blacklisted.', videoInstance.uuid) 71 logger.info('Video %s blacklisted.', videoInstance.uuid)
71 72
72 return res.type('json').sendStatus(204) 73 return res.type('json').sendStatus(HttpStatusCode.NO_CONTENT_204)
73} 74}
74 75
75async function updateVideoBlacklistController (req: express.Request, res: express.Response) { 76async function updateVideoBlacklistController (req: express.Request, res: express.Response) {
@@ -81,7 +82,7 @@ async function updateVideoBlacklistController (req: express.Request, res: expres
81 return videoBlacklist.save({ transaction: t }) 82 return videoBlacklist.save({ transaction: t })
82 }) 83 })
83 84
84 return res.type('json').sendStatus(204) 85 return res.type('json').sendStatus(HttpStatusCode.NO_CONTENT_204)
85} 86}
86 87
87async function listBlacklist (req: express.Request, res: express.Response) { 88async function listBlacklist (req: express.Request, res: express.Response) {
@@ -104,5 +105,5 @@ async function removeVideoFromBlacklistController (req: express.Request, res: ex
104 105
105 logger.info('Video %s removed from blacklist.', video.uuid) 106 logger.info('Video %s removed from blacklist.', video.uuid)
106 107
107 return res.type('json').sendStatus(204) 108 return res.type('json').sendStatus(HttpStatusCode.NO_CONTENT_204)
108} 109}