Add overview of a user's actions in user-edit (#2558)

This commit is contained in:
Rigel Kent
2020-03-27 15:19:03 +01:00
committed by GitHub
parent 56d72521ec
commit 76314386ae
20 changed files with 618 additions and 184 deletions

View File

@@ -130,11 +130,12 @@ function getMyUserVideoQuotaUsed (url: string, accessToken: string, specialStatu
.expect('Content-Type', /json/)
}
function getUserInformation (url: string, accessToken: string, userId: number) {
function getUserInformation (url: string, accessToken: string, userId: number, withStats = false) {
const path = '/api/v1/users/' + userId
return request(url)
.get(path)
.query({ withStats })
.set('Accept', 'application/json')
.set('Authorization', 'Bearer ' + accessToken)
.expect(200)

View File

@@ -31,6 +31,11 @@ export interface User {
videoQuotaDaily: number
videoQuotaUsed?: number
videoQuotaUsedDaily?: number
videosCount?: number
videoAbusesCount?: number
videoAbusesAcceptedCount?: number
videoAbusesCreatedCount?: number
videoCommentsCount? : number
theme: string