aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/me.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users/me.ts')
-rw-r--r--server/controllers/api/users/me.ts12
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
30import { UserModel } from '../../../models/user/user' 30import { UserModel } from '../../../models/user/user'
31import { VideoModel } from '../../../models/video/video' 31import { VideoModel } from '../../../models/video/video'
32import { VideoImportModel } from '../../../models/video/video-import' 32import { VideoImportModel } from '../../../models/video/video-import'
33import { pick } from '@shared/core-utils'
33 34
34const auditLogger = auditLoggerFactory('users') 35const auditLogger = auditLoggerFactory('users')
35 36
@@ -133,12 +134,11 @@ async function getUserVideos (req: express.Request, res: express.Response) {
133 134
134async function getUserVideoImports (req: express.Request, res: express.Response) { 135async 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}