(info, challengers, title)
| 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 |