diff options
Diffstat (limited to 'server/controllers/api/videos/captions.ts')
-rw-r--r-- | server/controllers/api/videos/captions.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/videos/captions.ts b/server/controllers/api/videos/captions.ts index c4e2ee72c..bf82e2c19 100644 --- a/server/controllers/api/videos/captions.ts +++ b/server/controllers/api/videos/captions.ts | |||
@@ -11,6 +11,7 @@ import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' | |||
11 | import { CONFIG } from '../../../initializers/config' | 11 | import { CONFIG } from '../../../initializers/config' |
12 | import { sequelizeTypescript } from '../../../initializers/database' | 12 | import { sequelizeTypescript } from '../../../initializers/database' |
13 | import { MVideoCaptionVideo } from '@server/types/models' | 13 | import { MVideoCaptionVideo } from '@server/types/models' |
14 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
14 | 15 | ||
15 | const reqVideoCaptionAdd = createReqFiles( | 16 | const reqVideoCaptionAdd = createReqFiles( |
16 | [ 'captionfile' ], | 17 | [ 'captionfile' ], |
@@ -72,7 +73,7 @@ async function addVideoCaption (req: express.Request, res: express.Response) { | |||
72 | await federateVideoIfNeeded(video, false, t) | 73 | await federateVideoIfNeeded(video, false, t) |
73 | }) | 74 | }) |
74 | 75 | ||
75 | return res.status(204).end() | 76 | return res.status(HttpStatusCode.NO_CONTENT_204).end() |
76 | } | 77 | } |
77 | 78 | ||
78 | async function deleteVideoCaption (req: express.Request, res: express.Response) { | 79 | async function deleteVideoCaption (req: express.Request, res: express.Response) { |
@@ -88,5 +89,5 @@ async function deleteVideoCaption (req: express.Request, res: express.Response) | |||
88 | 89 | ||
89 | logger.info('Video caption %s of video %s deleted.', videoCaption.language, video.uuid) | 90 | logger.info('Video caption %s of video %s deleted.', videoCaption.language, video.uuid) |
90 | 91 | ||
91 | return res.type('json').status(204).end() | 92 | return res.type('json').status(HttpStatusCode.NO_CONTENT_204).end() |
92 | } | 93 | } |