mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Remove schoolName from school-counts user query
This commit is contained in:
parent
6a8776c31b
commit
1439016f9b
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ module.exports =
|
|||
getStudents: wrap (req, res, next) ->
|
||||
throw new errors.Unauthorized('You must be an administrator.') unless req.user?.isAdmin()
|
||||
query = $or: [{role: 'student'}, {$and: [{schoolName: {$exists: true}}, {schoolName: {$ne: ''}}, {anonymous: false}]}]
|
||||
users = yield User.find(query).select('lastIP schoolName').lean()
|
||||
users = yield User.find(query).select('lastIP').lean()
|
||||
for user in users
|
||||
if ip = user.lastIP
|
||||
user.geo = geoip.lookup(ip)
|
||||
|
|
Loading…
Reference in a new issue