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

Method addChallenger

app/views/ladder/LadderPlayModal.js:260–269  ·  view source on GitHub ↗
(info, challengers, title)

Source from the content-addressed store, hash-verified

258 }
259
260 addChallenger (info, challengers, title) {
261 // check for duplicates first
262 if (!info) { return }
263 for (const key in challengers) {
264 const value = challengers[key]
265 if (value.sessionID === info.sessionID) { return }
266 }
267 challengers[title] = info
268 return challengers[title]
269 }
270
271 challengeInfoFromSession (session) {
272 // given a model from the db, return info needed for a link to the match

Callers 1

getChallengersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected