mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 00:28:31 -05:00
14 lines
445 B
CoffeeScript
14 lines
445 B
CoffeeScript
LevelFeedback = require('../models/LevelFeedback')
|
|
Handler = require('./Handler')
|
|
|
|
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()
|