diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-20 09:05:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-20 09:25:44 +0200 |
commit | 978c87e7f58b6673fe60f04f1767bc9e02ea4936 (patch) | |
tree | e7d48735d4099fec8c7732f33e7dadb09c0eac80 /server/controllers | |
parent | 7e76cc380040e40a2292a9dc825f037c9b538030 (diff) | |
download | PeerTube-978c87e7f58b6673fe60f04f1767bc9e02ea4936.tar.gz PeerTube-978c87e7f58b6673fe60f04f1767bc9e02ea4936.tar.zst PeerTube-978c87e7f58b6673fe60f04f1767bc9e02ea4936.zip |
Add channel filters for my videos/followers
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/users/me.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index 83b774d3c..6bacdbbb6 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts | |||
@@ -25,7 +25,7 @@ import { | |||
25 | usersUpdateMeValidator, | 25 | usersUpdateMeValidator, |
26 | usersVideoRatingValidator | 26 | usersVideoRatingValidator |
27 | } from '../../../middlewares' | 27 | } from '../../../middlewares' |
28 | import { deleteMeValidator, videoImportsSortValidator, videosSortValidator } from '../../../middlewares/validators' | 28 | import { deleteMeValidator, usersVideosValidator, videoImportsSortValidator, videosSortValidator } from '../../../middlewares/validators' |
29 | import { updateAvatarValidator } from '../../../middlewares/validators/actor-image' | 29 | import { updateAvatarValidator } from '../../../middlewares/validators/actor-image' |
30 | import { AccountModel } from '../../../models/account/account' | 30 | import { AccountModel } from '../../../models/account/account' |
31 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 31 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
@@ -69,6 +69,7 @@ meRouter.get('/me/videos', | |||
69 | videosSortValidator, | 69 | videosSortValidator, |
70 | setDefaultVideosSort, | 70 | setDefaultVideosSort, |
71 | setDefaultPagination, | 71 | setDefaultPagination, |
72 | asyncMiddleware(usersVideosValidator), | ||
72 | asyncMiddleware(getUserVideos) | 73 | asyncMiddleware(getUserVideos) |
73 | ) | 74 | ) |
74 | 75 | ||
@@ -113,6 +114,7 @@ async function getUserVideos (req: express.Request, res: express.Response) { | |||
113 | count: req.query.count, | 114 | count: req.query.count, |
114 | sort: req.query.sort, | 115 | sort: req.query.sort, |
115 | search: req.query.search, | 116 | search: req.query.search, |
117 | channelId: res.locals.videoChannel?.id, | ||
116 | isLive: req.query.isLive | 118 | isLive: req.query.isLive |
117 | }, 'filter:api.user.me.videos.list.params') | 119 | }, 'filter:api.user.me.videos.list.params') |
118 | 120 | ||