diff options
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r-- | server/controllers/api/videos/index.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 3532c753e..4ae7ea2ed 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -39,6 +39,7 @@ import { | |||
39 | renamePromise | 39 | renamePromise |
40 | } from '../../../helpers' | 40 | } from '../../../helpers' |
41 | import { TagInstance } from '../../../models' | 41 | import { TagInstance } from '../../../models' |
42 | import { VideoCreate, VideoUpdate } from '../../../../shared' | ||
42 | 43 | ||
43 | import { abuseVideoRouter } from './abuse' | 44 | import { abuseVideoRouter } from './abuse' |
44 | import { blacklistRouter } from './blacklist' | 45 | import { blacklistRouter } from './blacklist' |
@@ -155,7 +156,7 @@ function addVideoRetryWrapper (req: express.Request, res: express.Response, next | |||
155 | } | 156 | } |
156 | 157 | ||
157 | function addVideo (req: express.Request, res: express.Response, videoFile: Express.Multer.File) { | 158 | function addVideo (req: express.Request, res: express.Response, videoFile: Express.Multer.File) { |
158 | const videoInfos = req.body | 159 | const videoInfos: VideoCreate = req.body |
159 | 160 | ||
160 | return db.sequelize.transaction(t => { | 161 | return db.sequelize.transaction(t => { |
161 | const user = res.locals.oauth.token.User | 162 | const user = res.locals.oauth.token.User |
@@ -257,7 +258,7 @@ function updateVideoRetryWrapper (req: express.Request, res: express.Response, n | |||
257 | function updateVideo (req: express.Request, res: express.Response) { | 258 | function updateVideo (req: express.Request, res: express.Response) { |
258 | const videoInstance = res.locals.video | 259 | const videoInstance = res.locals.video |
259 | const videoFieldsSave = videoInstance.toJSON() | 260 | const videoFieldsSave = videoInstance.toJSON() |
260 | const videoInfosToUpdate = req.body | 261 | const videoInfosToUpdate: VideoUpdate = req.body |
261 | 262 | ||
262 | return db.sequelize.transaction(t => { | 263 | return db.sequelize.transaction(t => { |
263 | let tagsPromise: Promise<TagInstance[]> | 264 | let tagsPromise: Promise<TagInstance[]> |