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

Method refreshNames

app/views/clans/ClansView.js:105–118  ·  view source on GitHub ↗
(clans)

Source from the content-addressed store, hash-verified

103 }
104
105 refreshNames (clans) {
106 let clanIDs = _.filter(clans, clan => clan.get('type') === 'public')
107 clanIDs = _.filter(_.map(clans, clan => clan.get('ownerID')))
108 const options = {
109 url: '/db/user/-/names',
110 method: 'POST',
111 data: { ids: clanIDs },
112 success: (models, response, options) => {
113 for (const userID in models) { this.idNameMap[userID] = models[userID].name }
114 return (typeof this.render === 'function' ? this.render() : undefined)
115 }
116 }
117 return this.supermodel.addRequestResource('user_names', options, 0).load()
118 }
119
120 setupPrivateInfoPopover () {
121 const popoverTitle = '<h3>' + $.i18n.t('clans.private_clans') + '</h3>'

Callers 1

loadDataMethod · 0.95

Calls 4

filterMethod · 0.80
getMethod · 0.45
renderMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected