codecombat/server/levels/feedbacks/level_feedback_handler.coffee

15 lines
449 B
CoffeeScript
Raw Normal View History

LevelFeedback = require('./LevelFeedback')
Handler = require('../../commons/Handler')
2014-01-03 13:32:13 -05:00
class LevelFeedbackHandler extends Handler
modelClass: LevelFeedback
editableProperties: ['rating', 'review', 'level', 'levelID', 'levelName']
makeNewInstance: (req) ->
feedback = super(req)
feedback.set('creator', req.user._id)
feedback.set('creatorName', req.user.get('name') or '')
feedback
module.exports = new LevelFeedbackHandler()