mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 10:10:08 +02:00
Use the query operator for existence check
This commit is contained in:
@@ -85,10 +85,10 @@ module.exports = UserSessionsManager =
|
||||
return callback(null, result)
|
||||
|
||||
revokeAllUserSessions: (user, retain, callback=(err)->) ->
|
||||
if !retain
|
||||
if !retain?
|
||||
retain = []
|
||||
retain = retain.map((i) -> UserSessionsManager._sessionKey(i))
|
||||
if !user
|
||||
if !user?
|
||||
logger.log {}, "no user to revoke sessions for, returning"
|
||||
return callback(null)
|
||||
logger.log {user_id: user._id}, "revoking all existing sessions for user"
|
||||
|
||||
Reference in New Issue
Block a user