(userIDs, opts)
| 39 | } |
| 40 | |
| 41 | addMembers (userIDs, opts) { |
| 42 | const options = { |
| 43 | method: 'POST', |
| 44 | url: _.result(this, 'url') + '/members', |
| 45 | data: { userIDs }, |
| 46 | success: () => { |
| 47 | return this.trigger('add-members', { userIDs }) |
| 48 | } |
| 49 | } |
| 50 | _.extend(options, opts) |
| 51 | const jqxhr = this.fetch(options) |
| 52 | if (Array.from(userIDs).includes(me.id)) { |
| 53 | if (!me.get('courseInstances')) { |
| 54 | me.set('courseInstances', []) |
| 55 | } |
| 56 | me.get('courseInstances').push(this.id) |
| 57 | } |
| 58 | return jqxhr |
| 59 | } |
| 60 | |
| 61 | removeMember (userID, opts) { |
| 62 | const options = { |
no test coverage detected