codecombat/server/levels/drafts/level_draft_handler.coffee

13 lines
350 B
CoffeeScript
Raw Normal View History

LevelDraft = require('./LevelDraft')
Handler = require('../../commons/Handler')
2014-01-03 13:32:13 -05:00
LevelDraftHandler = class LevelDraftHandler extends Handler
modelClass: LevelDraft
editableProperties: ['level']
postEditableProperties: ['user']
post: (req, res) ->
req.body.user = req.user._id
super(req, res)
module.exports = new LevelDraftHandler()