mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
15 lines
497 B
CoffeeScript
15 lines
497 B
CoffeeScript
LevelFeedback = require('./LevelFeedback')
|
|
Handler = require('../../commons/Handler')
|
|
|
|
class LevelFeedbackHandler extends Handler
|
|
modelClass: LevelFeedback
|
|
editableProperties: ['rating', 'review', 'level', 'levelID', 'levelName']
|
|
jsonSchema: require './level_feedback_schema'
|
|
|
|
makeNewInstance: (req) ->
|
|
feedback = super(req)
|
|
feedback.set('creator', req.user._id)
|
|
feedback.set('creatorName', req.user.get('name') or '')
|
|
feedback
|
|
|
|
module.exports = new LevelFeedbackHandler()
|