MCPcopy Index your code
hub / github.com/codecombat/codecombat / addMember

Method addMember

app/models/CourseInstance.js:24–39  ·  view source on GitHub ↗
(userID, opts)

Source from the content-addressed store, hash-verified

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 = {

Callers 2

Calls 3

fetchMethod · 0.45
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected