From 5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 May 2018 11:00:57 +0200 Subject: Fix typings --- server/controllers/api/users.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/controllers/api') 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' 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) { -- cgit v1.2.3