Fixed some critical bugs

This commit is contained in:
Bobby Wibowo 2019-09-09 01:33:07 +07:00
parent 19dcd4fd02
commit df8cac0f0b
No known key found for this signature in database
GPG Key ID: 51C3A1E1E22D26CF
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ self.register = async (req, res, next) => {
permission: perms.permissions.user
})
utils.invalidateStatsCache('users')
token.onHold.delete(token)
tokens.onHold.delete(token)
return res.json({ success: true, token })
} catch (error) {

View File

@ -336,7 +336,7 @@ self.bulkDeleteFromDb = async (field, values, user) => {
.whereIn(field, chunks[i])
.where(function () {
if (!ismoderator)
self.where('userid', user.id)
this.where('userid', user.id)
})
// Push files that could not be found in db