diff options
Diffstat (limited to 'server/controllers/api/users')
-rw-r--r-- | server/controllers/api/users/me.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index 878dd5a84..c2ad0b710 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts | |||
@@ -30,6 +30,7 @@ import { AccountVideoRateModel } from '../../../models/account/account-video-rat | |||
30 | import { UserModel } from '../../../models/user/user' | 30 | import { UserModel } from '../../../models/user/user' |
31 | import { VideoModel } from '../../../models/video/video' | 31 | import { VideoModel } from '../../../models/video/video' |
32 | import { VideoImportModel } from '../../../models/video/video-import' | 32 | import { VideoImportModel } from '../../../models/video/video-import' |
33 | import { pick } from '@shared/core-utils' | ||
33 | 34 | ||
34 | const auditLogger = auditLoggerFactory('users') | 35 | const auditLogger = auditLoggerFactory('users') |
35 | 36 | ||
@@ -133,12 +134,11 @@ async function getUserVideos (req: express.Request, res: express.Response) { | |||
133 | 134 | ||
134 | async function getUserVideoImports (req: express.Request, res: express.Response) { | 135 | async function getUserVideoImports (req: express.Request, res: express.Response) { |
135 | const user = res.locals.oauth.token.User | 136 | const user = res.locals.oauth.token.User |
136 | const resultList = await VideoImportModel.listUserVideoImportsForApi( | 137 | const resultList = await VideoImportModel.listUserVideoImportsForApi({ |
137 | user.id, | 138 | userId: user.id, |
138 | req.query.start as number, | 139 | |
139 | req.query.count as number, | 140 | ...pick(req.query, [ 'targetUrl', 'start', 'count', 'sort' ]) |
140 | req.query.sort | 141 | }) |
141 | ) | ||
142 | 142 | ||
143 | return res.json(getFormattedObjects(resultList.data, resultList.total)) | 143 | return res.json(getFormattedObjects(resultList.data, resultList.total)) |
144 | } | 144 | } |