mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
13 lines
378 B
CoffeeScript
13 lines
378 B
CoffeeScript
mongoose = require 'mongoose'
|
|
Handler = require '../commons/Handler'
|
|
Course = require './Course'
|
|
|
|
CourseHandler = class CourseHandler extends Handler
|
|
modelClass: Course
|
|
jsonSchema: require '../../app/schemas/models/course.schema'
|
|
allowedMethods: ['GET']
|
|
|
|
hasAccess: (req) ->
|
|
req.method in @allowedMethods or req.user?.isAdmin()
|
|
|
|
module.exports = new CourseHandler()
|