mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
8ab69cf833
Search endpoint is now without the /search prefix
15 lines
515 B
CoffeeScript
15 lines
515 B
CoffeeScript
Achievement = require './Achievement'
|
|
Handler = require '../commons/Handler'
|
|
|
|
class AchievementHandler extends Handler
|
|
modelClass: Achievement
|
|
|
|
# Used to determine which properties requests may edit
|
|
editableProperties: ['name', 'query', 'worth', 'collection', 'description', 'userField', 'proportionalTo', 'icon', 'function']
|
|
jsonSchema = require '../../app/schemas/models/achievement.coffee'
|
|
|
|
hasAccess: (req) ->
|
|
req.method is 'GET' or req.user?.isAdmin()
|
|
|
|
|
|
module.exports = new AchievementHandler()
|