codecombat/app/collections/Levels.coffee
2016-04-27 09:58:04 -07:00

15 lines
No EOL
477 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)