aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/captions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/captions.ts')
-rw-r--r--server/controllers/api/videos/captions.ts5
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'
11import { CONFIG } from '../../../initializers/config' 11import { CONFIG } from '../../../initializers/config'
12import { sequelizeTypescript } from '../../../initializers/database' 12import { sequelizeTypescript } from '../../../initializers/database'
13import { MVideoCaptionVideo } from '@server/types/models' 13import { MVideoCaptionVideo } from '@server/types/models'
14import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
14 15
15const reqVideoCaptionAdd = createReqFiles( 16const 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
78async function deleteVideoCaption (req: express.Request, res: express.Response) { 79async 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}