codecombat/app/collections/LevelSessions.coffee
2016-01-25 13:03:29 -08:00

12 lines
415 B
CoffeeScript

CocoCollection = require 'collections/CocoCollection'
LevelSession = require 'models/LevelSession'
module.exports = class LevelSessionCollection extends CocoCollection
url: '/db/level.session'
model: LevelSession
fetchForCourseInstance: (courseInstanceID, options) ->
options = _.extend({
url: "/db/course_instance/#{courseInstanceID}/my-course-level-sessions"
}, options)
@fetch(options)