1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Fix typings

This commit is contained in:
Chocobozzz 2018-05-16 11:00:57 +02:00
parent 1335920348
commit 5fcbd89841
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 17 additions and 11 deletions

View file

@ -44,6 +44,7 @@ import { OAuthTokenModel } from '../../models/oauth/oauth-token'
import { VideoModel } from '../../models/video/video'
import { VideoSortField } from '../../../client/src/app/shared/video/sort-field.type'
import { createReqFiles } from '../../helpers/express-utils'
import { UserVideoQuota } from '../../../shared/models/users/user-video-quota.model'
const reqAvatarFile = createReqFiles([ 'avatarfile' ], IMAGE_MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.AVATARS_DIR })
const loginRateLimiter = new RateLimit({
@ -253,9 +254,10 @@ async function getUserVideoQuotaUsed (req: express.Request, res: express.Respons
const user = await UserModel.loadByUsernameAndPopulateChannels(res.locals.oauth.token.user.username)
const videoQuotaUsed = await UserModel.getOriginalVideoFileTotalFromUser(user)
return res.json({
const data: UserVideoQuota = {
videoQuotaUsed
})
}
return res.json(data)
}
function getUser (req: express.Request, res: express.Response, next: express.NextFunction) {