aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/middlewares/video-playlists.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/middlewares/video-playlists.ts')
-rw-r--r--server/helpers/middlewares/video-playlists.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/middlewares/video-playlists.ts b/server/helpers/middlewares/video-playlists.ts
index 344104f7c..d2dd80a35 100644
--- a/server/helpers/middlewares/video-playlists.ts
+++ b/server/helpers/middlewares/video-playlists.ts
@@ -1,6 +1,7 @@
1import * as express from 'express' 1import * as express from 'express'
2import { VideoPlaylistModel } from '../../models/video/video-playlist' 2import { VideoPlaylistModel } from '../../models/video/video-playlist'
3import { MVideoPlaylist } from '../../types/models/video/video-playlist' 3import { MVideoPlaylist } from '../../types/models/video/video-playlist'
4import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
4 5
5export type VideoPlaylistFetchType = 'summary' | 'all' 6export type VideoPlaylistFetchType = 'summary' | 'all'
6async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') { 7async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') {
@@ -27,7 +28,7 @@ export {
27 28
28function handleVideoPlaylist (videoPlaylist: MVideoPlaylist, res: express.Response) { 29function handleVideoPlaylist (videoPlaylist: MVideoPlaylist, res: express.Response) {
29 if (!videoPlaylist) { 30 if (!videoPlaylist) {
30 res.status(404) 31 res.status(HttpStatusCode.NOT_FOUND_404)
31 .json({ error: 'Video playlist not found' }) 32 .json({ error: 'Video playlist not found' })
32 .end() 33 .end()
33 34