MCPcopy Create free account
hub / github.com/codecombat/codecombat / onSyncClans

Method onSyncClans

app/views/user/MainUserView.js:106–120  ·  view source on GitHub ↗
(clans)

Source from the content-addressed store, hash-verified

104 }
105
106 onSyncClans (clans) {
107 if (clans == null) { return }
108 this.idNameMap = []
109 this.clanModels = clans
110 const options = {
111 url: '/db/user/-/names',
112 method: 'POST',
113 data: { ids: _.map(clans, clan => clan.get('ownerID')) },
114 success: (models, response, options) => {
115 for (const userID in models) { this.idNameMap[userID] = models[userID].name }
116 return (typeof this.render === 'function' ? this.render() : undefined)
117 }
118 }
119 return this.supermodel.addRequestResource('user_names', options, 0).load()
120 }
121
122 onSyncLevelSessions (levelSessions) {
123 let language

Callers 1

onLoadedMethod · 0.95

Calls 3

getMethod · 0.45
renderMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected