mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-02 16:21:01 -04:00
Add codeLanguage to level session
This commit is contained in:
parent
dd1acb94ed
commit
4e268d8dc6
2 changed files with 7 additions and 4 deletions
|
@ -108,7 +108,11 @@ _.extend LevelSessionSchema.properties,
|
|||
additionalProperties:
|
||||
type: 'string'
|
||||
format: 'javascript'
|
||||
|
||||
|
||||
codeLanguage:
|
||||
type: 'string'
|
||||
default: 'javascript'
|
||||
|
||||
teamSpells:
|
||||
type: 'object'
|
||||
additionalProperties:
|
||||
|
@ -146,8 +150,7 @@ _.extend LevelSessionSchema.properties,
|
|||
submittedCodeLanguage:
|
||||
type: 'string'
|
||||
default: 'javascript'
|
||||
enum: ['javascript', 'coffeescript', 'clojure', 'lua','python']
|
||||
|
||||
|
||||
transpiledCode:
|
||||
type: 'object'
|
||||
additionalProperties:
|
||||
|
|
|
@ -6,7 +6,7 @@ TIMEOUT = 1000 * 30 # no activity for 30 seconds means it's not active
|
|||
|
||||
class LevelSessionHandler extends Handler
|
||||
modelClass: LevelSession
|
||||
editableProperties: ['multiplayer', 'players', 'code', 'completed', 'state',
|
||||
editableProperties: ['multiplayer', 'players', 'code', 'codeLanguage', 'completed', 'state',
|
||||
'levelName', 'creatorName', 'levelID', 'screenshot',
|
||||
'chat', 'teamSpells', 'submitted', 'unsubscribed']
|
||||
jsonSchema: require '../../../app/schemas/models/level_session'
|
||||
|
|
Loading…
Add table
Reference in a new issue