diff options
Diffstat (limited to 'server/lib/user.ts')
-rw-r--r-- | server/lib/user.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/server/lib/user.ts b/server/lib/user.ts index d3338f329..7d6497302 100644 --- a/server/lib/user.ts +++ b/server/lib/user.ts | |||
@@ -18,8 +18,6 @@ import { Redis } from './redis' | |||
18 | import { createLocalVideoChannel } from './video-channel' | 18 | import { createLocalVideoChannel } from './video-channel' |
19 | import { createWatchLaterPlaylist } from './video-playlist' | 19 | import { createWatchLaterPlaylist } from './video-playlist' |
20 | 20 | ||
21 | import memoizee = require('memoizee') | ||
22 | |||
23 | type ChannelNames = { name: string, displayName: string } | 21 | type ChannelNames = { name: string, displayName: string } |
24 | 22 | ||
25 | async function createUserAccountAndChannelAndPlaylist (parameters: { | 23 | async function createUserAccountAndChannelAndPlaylist (parameters: { |
@@ -152,8 +150,8 @@ async function isAbleToUploadVideo (userId: number, size: number) { | |||
152 | if (user.videoQuota === -1 && user.videoQuotaDaily === -1) return Promise.resolve(true) | 150 | if (user.videoQuota === -1 && user.videoQuotaDaily === -1) return Promise.resolve(true) |
153 | 151 | ||
154 | const [ totalBytes, totalBytesDaily ] = await Promise.all([ | 152 | const [ totalBytes, totalBytesDaily ] = await Promise.all([ |
155 | getOriginalVideoFileTotalFromUser(user.id), | 153 | getOriginalVideoFileTotalFromUser(user), |
156 | getOriginalVideoFileTotalDailyFromUser(user.id) | 154 | getOriginalVideoFileTotalDailyFromUser(user) |
157 | ]) | 155 | ]) |
158 | 156 | ||
159 | const uploadedTotal = size + totalBytes | 157 | const uploadedTotal = size + totalBytes |