mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
15 lines
No EOL
477 B
CoffeeScript
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)
|
|
|