mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 16:17:57 -05:00
26 lines
570 B
CoffeeScript
26 lines
570 B
CoffeeScript
UserCodeProblem = require './UserCodeProblem'
|
|
Handler = require '../commons/Handler'
|
|
|
|
class UserCodeProblemHandler extends Handler
|
|
modelClass: UserCodeProblem
|
|
jsonSchema: require '../../app/schemas/models/user_code_problem'
|
|
editableProperties: [
|
|
'code'
|
|
'codeSnippet'
|
|
'errHint'
|
|
'errId'
|
|
'errLevel'
|
|
'errMessage'
|
|
'errMessageNoLineInfo'
|
|
'errRange'
|
|
'errType'
|
|
'language'
|
|
'levelID'
|
|
]
|
|
|
|
makeNewInstance: (req) ->
|
|
ucp = super(req)
|
|
ucp.set('creator', req.user._id)
|
|
ucp
|
|
|
|
module.exports = new UserCodeProblemHandler()
|