aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-10 19:43:21 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-10 19:43:21 +0200
commit4771e0008dd26eadbb7eaff64255a6ec914fdadb (patch)
tree4fd58f8a3f3c2d674b936c99817b4f5fb958c5d8 /server/controllers/api/videos/index.ts
parent7a214f746bf420defbf17fa218d90d6233551bf8 (diff)
downloadPeerTube-4771e0008dd26eadbb7eaff64255a6ec914fdadb.tar.gz
PeerTube-4771e0008dd26eadbb7eaff64255a6ec914fdadb.tar.zst
PeerTube-4771e0008dd26eadbb7eaff64255a6ec914fdadb.zip
Better typescript typing for a better world
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts5
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'
41import { TagInstance } from '../../../models' 41import { TagInstance } from '../../../models'
42import { VideoCreate, VideoUpdate } from '../../../../shared'
42 43
43import { abuseVideoRouter } from './abuse' 44import { abuseVideoRouter } from './abuse'
44import { blacklistRouter } from './blacklist' 45import { blacklistRouter } from './blacklist'
@@ -155,7 +156,7 @@ function addVideoRetryWrapper (req: express.Request, res: express.Response, next
155} 156}
156 157
157function addVideo (req: express.Request, res: express.Response, videoFile: Express.Multer.File) { 158function 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
257function updateVideo (req: express.Request, res: express.Response) { 258function 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[]>