aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-03-27 15:19:03 +0100
committerGitHub <noreply@github.com>2020-03-27 15:19:03 +0100
commit76314386aeafdd6849b7b70c517779d6b2013473 (patch)
treef0ba33e0f6e7b2eb99222a9eb5b85846cf309ab1 /shared
parent56d72521ec139dfc0aef083b8541a5b16d974ac1 (diff)
downloadPeerTube-76314386aeafdd6849b7b70c517779d6b2013473.tar.gz
PeerTube-76314386aeafdd6849b7b70c517779d6b2013473.tar.zst
PeerTube-76314386aeafdd6849b7b70c517779d6b2013473.zip
Add overview of a user's actions in user-edit (#2558)
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