Fix daily upload counting
This commit is contained in:
parent
d30b0987ad
commit
8e47c74b68
3 changed files with 4 additions and 3 deletions
|
@ -58,7 +58,7 @@ export function* setupSession(user) {
|
|||
'maxFileSize': 20971520,
|
||||
'joined': user.joined,
|
||||
'plan': user.type || 'Free',
|
||||
'uploadsToday': 0,
|
||||
'uploadsToday': yield this.db.Files.count({owner: user._id, 'time_added': {'$gt': Math.ceil(Date.now()/1000)-86400}}),
|
||||
'token': token,
|
||||
'md5': crypto.createHash('md5').update(user.email).digest('hex')
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue