- return exists(value) && VIDEO_PLAYLIST_TYPES[ value ] !== undefined
-}
-
-async function isVideoPlaylistExist (id: number | string, res: express.Response) {
- const videoPlaylist = await VideoPlaylistModel.loadWithAccountAndChannel(id, undefined)
-
- if (!videoPlaylist) {
- res.status(404)
- .json({ error: 'Video playlist not found' })
- .end()
-
- return false
- }
-
- res.locals.videoPlaylist = videoPlaylist
- return true