aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-16 11:00:57 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 11:06:33 +0200
commit5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d (patch)
tree5d3623fc06281065b12ab9687fead7194b62cb3f /server
parent133592034881926dc2da63735fe7344bfedd9c31 (diff)
downloadPeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.tar.gz
PeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.tar.zst
PeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.zip
Fix typings
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/users.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts
index 2342c23dd..0a591f11d 100644
--- a/server/controllers/api/users.ts
+++ b/server/controllers/api/users.ts
@@ -44,6 +44,7 @@ import { OAuthTokenModel } from '../../models/oauth/oauth-token'
44import { VideoModel } from '../../models/video/video' 44import { VideoModel } from '../../models/video/video'
45import { VideoSortField } from '../../../client/src/app/shared/video/sort-field.type' 45import { VideoSortField } from '../../../client/src/app/shared/video/sort-field.type'
46import { createReqFiles } from '../../helpers/express-utils' 46import { createReqFiles } from '../../helpers/express-utils'
47import { UserVideoQuota } from '../../../shared/models/users/user-video-quota.model'
47 48
48const reqAvatarFile = createReqFiles([ 'avatarfile' ], IMAGE_MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.AVATARS_DIR }) 49const reqAvatarFile = createReqFiles([ 'avatarfile' ], IMAGE_MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.AVATARS_DIR })
49const loginRateLimiter = new RateLimit({ 50const loginRateLimiter = new RateLimit({
@@ -253,9 +254,10 @@ async function getUserVideoQuotaUsed (req: express.Request, res: express.Respons
253 const user = await UserModel.loadByUsernameAndPopulateChannels(res.locals.oauth.token.user.username) 254 const user = await UserModel.loadByUsernameAndPopulateChannels(res.locals.oauth.token.user.username)
254 const videoQuotaUsed = await UserModel.getOriginalVideoFileTotalFromUser(user) 255 const videoQuotaUsed = await UserModel.getOriginalVideoFileTotalFromUser(user)
255 256
256 return res.json({ 257 const data: UserVideoQuota = {
257 videoQuotaUsed 258 videoQuotaUsed
258 }) 259 }
260 return res.json(data)
259} 261}
260 262
261function getUser (req: express.Request, res: express.Response, next: express.NextFunction) { 263function getUser (req: express.Request, res: express.Response, next: express.NextFunction) {