]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/middlewares/video-playlists.ts
Fix preview upload with capitalized ext
[github/Chocobozzz/PeerTube.git] / server / helpers / middlewares / video-playlists.ts
index 344104f7c06c621b2da41ab6a052c328ca25dce9..d2dd80a352f05a0a6e7760c1b9d8ae53e916e0a0 100644 (file)
@@ -1,6 +1,7 @@
 import * as express from 'express'
 import { VideoPlaylistModel } from '../../models/video/video-playlist'
 import { MVideoPlaylist } from '../../types/models/video/video-playlist'
+import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
 
 export type VideoPlaylistFetchType = 'summary' | 'all'
 async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') {
@@ -27,7 +28,7 @@ export {
 
 function handleVideoPlaylist (videoPlaylist: MVideoPlaylist, res: express.Response) {
   if (!videoPlaylist) {
-    res.status(404)
+    res.status(HttpStatusCode.NOT_FOUND_404)
        .json({ error: 'Video playlist not found' })
        .end()