codecombat/app/collections/LevelSessions.coffee

13 lines
415 B
CoffeeScript
Raw Normal View History

2016-01-19 18:42:20 -05:00
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)