aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users.ts')
-rw-r--r--server/controllers/api/users.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts
index 8dff4b87c..2b40c44d9 100644
--- a/server/controllers/api/users.ts
+++ b/server/controllers/api/users.ts
@@ -166,7 +166,7 @@ export {
166 166
167async function getUserVideos (req: express.Request, res: express.Response, next: express.NextFunction) { 167async function getUserVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
168 const user = res.locals.oauth.token.User as UserModel 168 const user = res.locals.oauth.token.User as UserModel
169 const resultList = await VideoModel.listAccountVideosForApi( 169 const resultList = await VideoModel.listUserVideosForApi(
170 user.Account.id, 170 user.Account.id,
171 req.query.start as number, 171 req.query.start as number,
172 req.query.count as number, 172 req.query.count as number,
@@ -174,7 +174,8 @@ async function getUserVideos (req: express.Request, res: express.Response, next:
174 false // Display my NSFW videos 174 false // Display my NSFW videos
175 ) 175 )
176 176
177 return res.json(getFormattedObjects(resultList.data, resultList.total)) 177 const additionalAttributes = { waitTranscoding: true, state: true }
178 return res.json(getFormattedObjects(resultList.data, resultList.total, { additionalAttributes }))
178} 179}
179 180
180async function createUserRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) { 181async function createUserRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {
@@ -318,7 +319,7 @@ async function updateMe (req: express.Request, res: express.Response, next: expr
318} 319}
319 320
320async function updateMyAvatar (req: express.Request, res: express.Response, next: express.NextFunction) { 321async function updateMyAvatar (req: express.Request, res: express.Response, next: express.NextFunction) {
321 const avatarPhysicalFile = req.files['avatarfile'][0] 322 const avatarPhysicalFile = req.files[ 'avatarfile' ][ 0 ]
322 const user = res.locals.oauth.token.user 323 const user = res.locals.oauth.token.user
323 const actor = user.Account.Actor 324 const actor = user.Account.Actor
324 325