mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-12 08:41:46 -05:00
17 lines
527 B
CoffeeScript
17 lines
527 B
CoffeeScript
|
|
mongoose = require 'mongoose'
|
|
Handler = require '../commons//Handler'
|
|
Course = require '../models/Course'
|
|
|
|
# TODO: Refactor PatchHandler.setStatus into its own route.
|
|
# This handler has been resurrected solely so that course patches can be accepted.
|
|
|
|
CourseHandler = class CourseHandler extends Handler
|
|
modelClass: Course
|
|
jsonSchema: require '../../app/schemas/models/course.schema'
|
|
allowedMethods: []
|
|
|
|
hasAccess: (req) ->
|
|
req.method in @allowedMethods or req.user?.isAdmin()
|
|
|
|
module.exports = new CourseHandler()
|