1 import { Response } from 'express'
2 import { VideoBlacklistModel } from '@server/models/video/video-blacklist'
3 import { HttpStatusCode } from '@shared/models'
5 async function doesVideoBlacklistExist (videoId: number, res: Response) {
6 const videoBlacklist = await VideoBlacklistModel.loadByVideoId(videoId)
8 if (videoBlacklist === null) {
10 status: HttpStatusCode.NOT_FOUND_404,
11 message: 'Blacklisted video not found'
16 res.locals.videoBlacklist = videoBlacklist
20 // ---------------------------------------------------------------------------
23 doesVideoBlacklistExist