mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-18 11:32:25 -05:00
14 lines
353 B
CoffeeScript
14 lines
353 B
CoffeeScript
|
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()
|