aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/users/users.ts3
-rw-r--r--shared/models/users/user.model.ts5
2 files changed, 7 insertions, 1 deletions
diff --git a/shared/extra-utils/users/users.ts b/shared/extra-utils/users/users.ts
index 248af2d6e..54b506bce 100644
--- a/shared/extra-utils/users/users.ts
+++ b/shared/extra-utils/users/users.ts
@@ -130,11 +130,12 @@ function getMyUserVideoQuotaUsed (url: string, accessToken: string, specialStatu
130 .expect('Content-Type', /json/) 130 .expect('Content-Type', /json/)
131} 131}
132 132
133function getUserInformation (url: string, accessToken: string, userId: number) { 133function getUserInformation (url: string, accessToken: string, userId: number, withStats = false) {
134 const path = '/api/v1/users/' + userId 134 const path = '/api/v1/users/' + userId
135 135
136 return request(url) 136 return request(url)
137 .get(path) 137 .get(path)
138 .query({ withStats })
138 .set('Accept', 'application/json') 139 .set('Accept', 'application/json')
139 .set('Authorization', 'Bearer ' + accessToken) 140 .set('Authorization', 'Bearer ' + accessToken)
140 .expect(200) 141 .expect(200)
diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts
index efb451014..a9c9bce30 100644
--- a/shared/models/users/user.model.ts
+++ b/shared/models/users/user.model.ts
@@ -31,6 +31,11 @@ export interface User {
31 videoQuotaDaily: number 31 videoQuotaDaily: number
32 videoQuotaUsed?: number 32 videoQuotaUsed?: number
33 videoQuotaUsedDaily?: number 33 videoQuotaUsedDaily?: number
34 videosCount?: number
35 videoAbusesCount?: number
36 videoAbusesAcceptedCount?: number
37 videoAbusesCreatedCount?: number
38 videoCommentsCount? : number
34 39
35 theme: string 40 theme: string
36 41