diff options
author | Chocobozzz <me@florianbigard.com> | 2018-05-16 11:00:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-05-16 11:06:33 +0200 |
commit | 5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d (patch) | |
tree | 5d3623fc06281065b12ab9687fead7194b62cb3f /server | |
parent | 133592034881926dc2da63735fe7344bfedd9c31 (diff) | |
download | PeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.tar.gz PeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.tar.zst PeerTube-5fcbd89841be29b373c6e4c8eeaa1f27414c8c7d.zip |
Fix typings
Diffstat (limited to 'server')
-rw-r--r-- | server/controllers/api/users.ts | 6 |
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' | |||
44 | import { VideoModel } from '../../models/video/video' | 44 | import { VideoModel } from '../../models/video/video' |
45 | import { VideoSortField } from '../../../client/src/app/shared/video/sort-field.type' | 45 | import { VideoSortField } from '../../../client/src/app/shared/video/sort-field.type' |
46 | import { createReqFiles } from '../../helpers/express-utils' | 46 | import { createReqFiles } from '../../helpers/express-utils' |
47 | import { UserVideoQuota } from '../../../shared/models/users/user-video-quota.model' | ||
47 | 48 | ||
48 | const reqAvatarFile = createReqFiles([ 'avatarfile' ], IMAGE_MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.AVATARS_DIR }) | 49 | const reqAvatarFile = createReqFiles([ 'avatarfile' ], IMAGE_MIMETYPE_EXT, { avatarfile: CONFIG.STORAGE.AVATARS_DIR }) |
49 | const loginRateLimiter = new RateLimit({ | 50 | const 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 | ||
261 | function getUser (req: express.Request, res: express.Response, next: express.NextFunction) { | 263 | function getUser (req: express.Request, res: express.Response, next: express.NextFunction) { |