aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r--server/controllers/api/users/me.ts3
-rw-r--r--server/controllers/api/users/my-subscriptions.ts19
2 files changed, 12 insertions, 10 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index 914c52e27..ba60a3d2a 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -17,6 +17,7 @@ import {
17 paginationValidator, 17 paginationValidator,
18 setDefaultPagination, 18 setDefaultPagination,
19 setDefaultSort, 19 setDefaultSort,
20 setDefaultVideosSort,
20 usersUpdateMeValidator, 21 usersUpdateMeValidator,
21 usersVideoRatingValidator 22 usersVideoRatingValidator
22} from '../../../middlewares' 23} from '../../../middlewares'
@@ -60,7 +61,7 @@ meRouter.get('/me/videos',
60 authenticate, 61 authenticate,
61 paginationValidator, 62 paginationValidator,
62 videosSortValidator, 63 videosSortValidator,
63 setDefaultSort, 64 setDefaultVideosSort,
64 setDefaultPagination, 65 setDefaultPagination,
65 asyncMiddleware(getUserVideos) 66 asyncMiddleware(getUserVideos)
66) 67)
diff --git a/server/controllers/api/users/my-subscriptions.ts b/server/controllers/api/users/my-subscriptions.ts
index 8b88feaf3..b8c234eef 100644
--- a/server/controllers/api/users/my-subscriptions.ts
+++ b/server/controllers/api/users/my-subscriptions.ts
@@ -1,7 +1,11 @@
1import * as express from 'express'
2import 'multer' 1import 'multer'
2import * as express from 'express'
3import { VideoFilter } from '../../../../shared/models/videos/video-query.type'
4import { buildNSFWFilter, getCountVideos } from '../../../helpers/express-utils'
3import { getFormattedObjects } from '../../../helpers/utils' 5import { getFormattedObjects } from '../../../helpers/utils'
4import { WEBSERVER } from '../../../initializers/constants' 6import { WEBSERVER } from '../../../initializers/constants'
7import { sequelizeTypescript } from '../../../initializers/database'
8import { JobQueue } from '../../../lib/job-queue'
5import { 9import {
6 asyncMiddleware, 10 asyncMiddleware,
7 asyncRetryTransactionMiddleware, 11 asyncRetryTransactionMiddleware,
@@ -10,21 +14,18 @@ import {
10 paginationValidator, 14 paginationValidator,
11 setDefaultPagination, 15 setDefaultPagination,
12 setDefaultSort, 16 setDefaultSort,
17 setDefaultVideosSort,
13 userSubscriptionAddValidator, 18 userSubscriptionAddValidator,
14 userSubscriptionGetValidator 19 userSubscriptionGetValidator
15} from '../../../middlewares' 20} from '../../../middlewares'
16import { 21import {
17 areSubscriptionsExistValidator, 22 areSubscriptionsExistValidator,
23 userSubscriptionListValidator,
18 userSubscriptionsSortValidator, 24 userSubscriptionsSortValidator,
19 videosSortValidator, 25 videosSortValidator
20 userSubscriptionListValidator
21} from '../../../middlewares/validators' 26} from '../../../middlewares/validators'
22import { VideoModel } from '../../../models/video/video'
23import { buildNSFWFilter, getCountVideos } from '../../../helpers/express-utils'
24import { VideoFilter } from '../../../../shared/models/videos/video-query.type'
25import { ActorFollowModel } from '../../../models/activitypub/actor-follow' 27import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
26import { JobQueue } from '../../../lib/job-queue' 28import { VideoModel } from '../../../models/video/video'
27import { sequelizeTypescript } from '../../../initializers/database'
28 29
29const mySubscriptionsRouter = express.Router() 30const mySubscriptionsRouter = express.Router()
30 31
@@ -32,7 +33,7 @@ mySubscriptionsRouter.get('/me/subscriptions/videos',
32 authenticate, 33 authenticate,
33 paginationValidator, 34 paginationValidator,
34 videosSortValidator, 35 videosSortValidator,
35 setDefaultSort, 36 setDefaultVideosSort,
36 setDefaultPagination, 37 setDefaultPagination,
37 commonVideosFiltersValidator, 38 commonVideosFiltersValidator,
38 asyncMiddleware(getUserSubscriptionVideos) 39 asyncMiddleware(getUserSubscriptionVideos)