codecombat/app/collections/Campaigns.coffee

12 lines
302 B
CoffeeScript
Raw Normal View History

2016-03-30 16:57:19 -04:00
Campaign = require 'models/Campaign'
CocoCollection = require 'collections/CocoCollection'
module.exports = class Campaigns extends CocoCollection
model: Campaign
url: '/db/campaign'
fetchByType: (type, options={}) ->
options.data ?= {}
options.data.type = type
@fetch(options)