mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-13 01:01:34 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
bfcf9605e5
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ module.exports =
|
||||||
return next() unless code
|
return next() unless code
|
||||||
classroom = yield Classroom.findOne({ code: code.toLowerCase() }).select('name ownerID aceConfig')
|
classroom = yield Classroom.findOne({ code: code.toLowerCase() }).select('name ownerID aceConfig')
|
||||||
if not classroom
|
if not classroom
|
||||||
res.status(404).send({})
|
throw new errors.NotFound('Classroom not found.')
|
||||||
classroom = classroom.toObject()
|
classroom = classroom.toObject()
|
||||||
# Tack on the teacher's name for display to the user
|
# Tack on the teacher's name for display to the user
|
||||||
owner = (yield User.findOne({ _id: mongoose.Types.ObjectId(classroom.ownerID) }).select('name')).toObject()
|
owner = (yield User.findOne({ _id: mongoose.Types.ObjectId(classroom.ownerID) }).select('name')).toObject()
|
||||||
|
|
Loading…
Reference in a new issue