diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/videos/source.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/source.ts b/server/controllers/api/videos/source.ts index b20c4af0e..75fe68b6c 100644 --- a/server/controllers/api/videos/source.ts +++ b/server/controllers/api/videos/source.ts | |||
@@ -14,7 +14,7 @@ import { openapiOperationDoc } from '@server/middlewares/doc' | |||
14 | import { VideoModel } from '@server/models/video/video' | 14 | import { VideoModel } from '@server/models/video/video' |
15 | import { VideoSourceModel } from '@server/models/video/video-source' | 15 | import { VideoSourceModel } from '@server/models/video/video-source' |
16 | import { MStreamingPlaylistFiles, MVideo, MVideoFile, MVideoFullLight } from '@server/types/models' | 16 | import { MStreamingPlaylistFiles, MVideo, MVideoFile, MVideoFullLight } from '@server/types/models' |
17 | import { HttpStatusCode, VideoState } from '@shared/models' | 17 | import { VideoState } from '@shared/models' |
18 | import { logger, loggerTagsFactory } from '../../../helpers/logger' | 18 | import { logger, loggerTagsFactory } from '../../../helpers/logger' |
19 | import { | 19 | import { |
20 | asyncMiddleware, | 20 | asyncMiddleware, |
@@ -121,7 +121,7 @@ async function replaceVideoSourceResumable (req: express.Request, res: express.R | |||
121 | 121 | ||
122 | await removeOldFiles({ video, files: oldWebVideoFiles, playlists: oldStreamingPlaylists }) | 122 | await removeOldFiles({ video, files: oldWebVideoFiles, playlists: oldStreamingPlaylists }) |
123 | 123 | ||
124 | await VideoSourceModel.create({ | 124 | const source = await VideoSourceModel.create({ |
125 | filename: originalFilename, | 125 | filename: originalFilename, |
126 | videoId: video.id, | 126 | videoId: video.id, |
127 | createdAt: inputFileUpdatedAt | 127 | createdAt: inputFileUpdatedAt |
@@ -135,7 +135,7 @@ async function replaceVideoSourceResumable (req: express.Request, res: express.R | |||
135 | 135 | ||
136 | Hooks.runAction('action:api.video.file-updated', { video, req, res }) | 136 | Hooks.runAction('action:api.video.file-updated', { video, req, res }) |
137 | 137 | ||
138 | return res.sendStatus(HttpStatusCode.NO_CONTENT_204) | 138 | return res.json(source.toFormattedJSON()) |
139 | } finally { | 139 | } finally { |
140 | videoFileMutexReleaser() | 140 | videoFileMutexReleaser() |
141 | } | 141 | } |