mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 10:56:53 -05:00
18 lines
602 B
CoffeeScript
18 lines
602 B
CoffeeScript
CocoCollection = require 'collections/CocoCollection'
|
|
Level = require 'models/Level'
|
|
|
|
module.exports = class LevelCollection extends CocoCollection
|
|
url: '/db/level'
|
|
model: Level
|
|
|
|
fetchForClassroom: (classroomID, options={}) ->
|
|
options.url = "/db/classroom/#{classroomID}/levels"
|
|
@fetch(options)
|
|
|
|
fetchForClassroomAndCourse: (classroomID, courseID, options={}) ->
|
|
options.url = "/db/classroom/#{classroomID}/courses/#{courseID}/levels"
|
|
@fetch(options)
|
|
|
|
fetchForCampaign: (campaignSlug, options={}) ->
|
|
options.url = "/db/campaign/#{campaignSlug}/levels"
|
|
@fetch(options)
|