aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/abuse.ts4
-rw-r--r--server/controllers/api/videos/index.ts8
2 files changed, 6 insertions, 6 deletions
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts
index 5cf0303fb..c9313d5f5 100644
--- a/server/controllers/api/videos/abuse.ts
+++ b/server/controllers/api/videos/abuse.ts
@@ -4,7 +4,7 @@ import { database as db } from '../../../initializers/database'
4import * as friends from '../../../lib/friends' 4import * as friends from '../../../lib/friends'
5import { 5import {
6 logger, 6 logger,
7 getFormatedObjects, 7 getFormattedObjects,
8 retryTransactionWrapper 8 retryTransactionWrapper
9} from '../../../helpers' 9} from '../../../helpers'
10import { 10import {
@@ -46,7 +46,7 @@ export {
46 46
47function listVideoAbuses (req: express.Request, res: express.Response, next: express.NextFunction) { 47function listVideoAbuses (req: express.Request, res: express.Response, next: express.NextFunction) {
48 db.VideoAbuse.listForApi(req.query.start, req.query.count, req.query.sort) 48 db.VideoAbuse.listForApi(req.query.start, req.query.count, req.query.sort)
49 .then(result => res.json(getFormatedObjects(result.data, result.total))) 49 .then(result => res.json(getFormattedObjects(result.data, result.total)))
50 .catch(err => next(err)) 50 .catch(err => next(err))
51} 51}
52 52
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}