codecombat/server/handlers/article.coffee

14 lines
353 B
CoffeeScript
Raw Normal View History

2014-01-03 13:32:13 -05:00
winston = require('winston')
request = require('request')
Article = require('../models/Article')
Handler = require('./Handler')
ArticleHandler = class ArticleHandler extends Handler
modelClass: Article
editableProperties: ['body', 'name']
hasAccess: (req) ->
req.method is 'GET' or req.user?.isAdmin()
module.exports = new ArticleHandler()