mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 08:38:09 -05:00
729cd300b7
- move and rename files - use associative arrays which store handlers for 'dynamically' load module from de db route - store models_path in test/server/common, a global model variable has the same name that the filename of the model
14 lines
449 B
CoffeeScript
14 lines
449 B
CoffeeScript
LevelFeedback = require('./LevelFeedback')
|
|
Handler = require('../../commons/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()
|