codecombat/app/collections/Levels.coffee

15 lines
477 B
CoffeeScript
Raw Normal View History

2016-03-30 16:57:19 -04:00
CocoCollection = require 'collections/CocoCollection'
Level = require 'models/Level'
module.exports = class LevelCollection extends CocoCollection
url: '/db/level'
model: Level
2016-04-13 12:54:24 -04:00
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)