(userID, opts)
| 22 | } |
| 23 | |
| 24 | addMember (userID, opts) { |
| 25 | const options = { |
| 26 | method: 'POST', |
| 27 | url: _.result(this, 'url') + '/members', |
| 28 | data: { userID } |
| 29 | } |
| 30 | _.extend(options, opts) |
| 31 | const jqxhr = this.fetch(options) |
| 32 | if (userID === me.id) { |
| 33 | if (!me.get('courseInstances')) { |
| 34 | me.set('courseInstances', []) |
| 35 | } |
| 36 | me.get('courseInstances').push(this.id) |
| 37 | } |
| 38 | return jqxhr |
| 39 | } |
| 40 | |
| 41 | addMembers (userIDs, opts) { |
| 42 | const options = { |
no test coverage detected