diff options
Diffstat (limited to 'server/helpers/custom-validators/video-imports.ts')
-rw-r--r-- | server/helpers/custom-validators/video-imports.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/video-imports.ts b/server/helpers/custom-validators/video-imports.ts index 33a1fa8ab..0063d3337 100644 --- a/server/helpers/custom-validators/video-imports.ts +++ b/server/helpers/custom-validators/video-imports.ts | |||
@@ -4,6 +4,7 @@ import { CONSTRAINTS_FIELDS, MIMETYPES, VIDEO_IMPORT_STATES } from '../../initia | |||
4 | import { exists, isFileValid } from './misc' | 4 | import { exists, isFileValid } from './misc' |
5 | import * as express from 'express' | 5 | import * as express from 'express' |
6 | import { VideoImportModel } from '../../models/video/video-import' | 6 | import { VideoImportModel } from '../../models/video/video-import' |
7 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
7 | 8 | ||
8 | function isVideoImportTargetUrlValid (url: string) { | 9 | function isVideoImportTargetUrlValid (url: string) { |
9 | const isURLOptions = { | 10 | const isURLOptions = { |
@@ -35,7 +36,7 @@ async function doesVideoImportExist (id: number, res: express.Response) { | |||
35 | const videoImport = await VideoImportModel.loadAndPopulateVideo(id) | 36 | const videoImport = await VideoImportModel.loadAndPopulateVideo(id) |
36 | 37 | ||
37 | if (!videoImport) { | 38 | if (!videoImport) { |
38 | res.status(404) | 39 | res.status(HttpStatusCode.NOT_FOUND_404) |
39 | .json({ error: 'Video import not found' }) | 40 | .json({ error: 'Video import not found' }) |
40 | .end() | 41 | .end() |
41 | 42 | ||