diff options
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r-- | server/controllers/api/users/me.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index 595abcf95..00f580ee9 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts | |||
@@ -25,7 +25,13 @@ import { | |||
25 | usersUpdateMeValidator, | 25 | usersUpdateMeValidator, |
26 | usersVideoRatingValidator | 26 | usersVideoRatingValidator |
27 | } from '../../../middlewares' | 27 | } from '../../../middlewares' |
28 | import { deleteMeValidator, usersVideosValidator, videoImportsSortValidator, videosSortValidator } from '../../../middlewares/validators' | 28 | import { |
29 | deleteMeValidator, | ||
30 | getMyVideoImportsValidator, | ||
31 | usersVideosValidator, | ||
32 | videoImportsSortValidator, | ||
33 | videosSortValidator | ||
34 | } from '../../../middlewares/validators' | ||
29 | import { updateAvatarValidator } from '../../../middlewares/validators/actor-image' | 35 | import { updateAvatarValidator } from '../../../middlewares/validators/actor-image' |
30 | import { AccountModel } from '../../../models/account/account' | 36 | import { AccountModel } from '../../../models/account/account' |
31 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 37 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
@@ -60,6 +66,7 @@ meRouter.get('/me/videos/imports', | |||
60 | videoImportsSortValidator, | 66 | videoImportsSortValidator, |
61 | setDefaultSort, | 67 | setDefaultSort, |
62 | setDefaultPagination, | 68 | setDefaultPagination, |
69 | getMyVideoImportsValidator, | ||
63 | asyncMiddleware(getUserVideoImports) | 70 | asyncMiddleware(getUserVideoImports) |
64 | ) | 71 | ) |
65 | 72 | ||
@@ -138,7 +145,7 @@ async function getUserVideoImports (req: express.Request, res: express.Response) | |||
138 | const resultList = await VideoImportModel.listUserVideoImportsForApi({ | 145 | const resultList = await VideoImportModel.listUserVideoImportsForApi({ |
139 | userId: user.id, | 146 | userId: user.id, |
140 | 147 | ||
141 | ...pick(req.query, [ 'targetUrl', 'start', 'count', 'sort' ]) | 148 | ...pick(req.query, [ 'targetUrl', 'start', 'count', 'sort', 'search', 'videoChannelSyncId' ]) |
142 | }) | 149 | }) |
143 | 150 | ||
144 | return res.json(getFormattedObjects(resultList.data, resultList.total)) | 151 | return res.json(getFormattedObjects(resultList.data, resultList.total)) |