codecombat/app/collections/Achievements.coffee

12 lines
371 B
CoffeeScript
Raw Normal View History

CocoCollection = require 'collections/CocoCollection'
2014-07-07 06:44:44 -04:00
Achievement = require 'models/Achievement'
module.exports = class AchievementCollection extends CocoCollection
2014-07-06 17:38:57 -04:00
url: '/db/achievement'
2014-07-07 06:44:44 -04:00
model: Achievement
2016-01-19 18:42:20 -05:00
fetchRelatedToLevel: (levelOriginal, options) ->
options = _.extend({data: {}}, options)
options.data.related = levelOriginal
@fetch(options)