1 import * as express from 'express'
2 import { VideoPlaylistModel } from '../../models/video/video-playlist'
4 async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: 'summary' | 'all' = 'summary') {
5 const videoPlaylist = fetchType === 'summary'
6 ? await VideoPlaylistModel.loadWithAccountAndChannelSummary(id, undefined)
7 : await VideoPlaylistModel.loadWithAccountAndChannel(id, undefined)
11 .json({ error: 'Video playlist not found' })
17 res.locals.videoPlaylist = videoPlaylist
21 // ---------------------------------------------------------------------------
24 doesVideoPlaylistExist