mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 16:51:35 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
a8acba2039
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ class LevelSessionHandler extends Handler
|
|||
|
||||
formatEntity: (req, document) ->
|
||||
document = super(req, document)
|
||||
submittedCode = document.submittedCode
|
||||
submittedCode = document.submittedCode ? {}
|
||||
unless req.user?.isAdmin() or
|
||||
req.user?.id is document.creator or
|
||||
('employer' in (req.user?.get('permissions') ? [])) or
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports.sendResponseObject = (res, object) ->
|
|||
module.exports.formatSessionInformation = (session) ->
|
||||
heroID = if session.team is 'ogres' then 'hero-placeholder-1' else 'hero-placeholder'
|
||||
submittedCode = {}
|
||||
submittedCode[heroID] = plan: LZString.compressToUTF16(session.submittedCode[heroID]?.plan ? '')
|
||||
submittedCode[heroID] = plan: LZString.compressToUTF16(session.submittedCode?[heroID]?.plan ? '')
|
||||
|
||||
_id: session._id
|
||||
sessionID: session._id
|
||||
|
|
Loading…
Reference in a new issue