aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index d71a132ed..f639df098 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -36,7 +36,7 @@ import {
36 logger, 36 logger,
37 retryTransactionWrapper, 37 retryTransactionWrapper,
38 generateRandomString, 38 generateRandomString,
39 getFormatedObjects, 39 getFormattedObjects,
40 renamePromise 40 renamePromise
41} from '../../../helpers' 41} from '../../../helpers'
42import { TagInstance } from '../../../models' 42import { TagInstance } from '../../../models'
@@ -386,12 +386,12 @@ function getVideo (req: express.Request, res: express.Response, next: express.Ne
386 } 386 }
387 387
388 // Do not wait the view system 388 // Do not wait the view system
389 res.json(videoInstance.toFormatedJSON()) 389 res.json(videoInstance.toFormattedJSON())
390} 390}
391 391
392function listVideos (req: express.Request, res: express.Response, next: express.NextFunction) { 392function listVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
393 db.Video.listForApi(req.query.start, req.query.count, req.query.sort) 393 db.Video.listForApi(req.query.start, req.query.count, req.query.sort)
394 .then(result => res.json(getFormatedObjects(result.data, result.total))) 394 .then(result => res.json(getFormattedObjects(result.data, result.total)))
395 .catch(err => next(err)) 395 .catch(err => next(err))
396} 396}
397 397
@@ -408,6 +408,6 @@ function removeVideo (req: express.Request, res: express.Response, next: express
408 408
409function searchVideos (req: express.Request, res: express.Response, next: express.NextFunction) { 409function searchVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
410 db.Video.searchAndPopulateAuthorAndPodAndTags(req.params.value, req.query.field, req.query.start, req.query.count, req.query.sort) 410 db.Video.searchAndPopulateAuthorAndPodAndTags(req.params.value, req.query.field, req.query.start, req.query.count, req.query.sort)
411 .then(result => res.json(getFormatedObjects(result.data, result.total))) 411 .then(result => res.json(getFormattedObjects(result.data, result.total)))
412 .catch(err => next(err)) 412 .catch(err => next(err))
413} 413}