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

Method onClickPublishButton

app/views/ladder/LadderView.js:378–386  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

376 }
377
378 onClickPublishButton (e) {
379 if (!this.tournamentId || (this.tournamentState !== 'waiting') || (me.get('_id') !== (this.league != null ? this.league.get('ownerID') : undefined))) { return }
380
381 return publishTournament({ id: this.tournamentId }).then(res => {
382 return window.location.href = window.location.href
383 }).catch(err => {
384 return alert('tournament results publish failed')
385 })
386 }
387
388 onClickSpectateButton (e) {
389 e.preventDefault()

Callers

nothing calls this directly

Calls 2

publishTournamentFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected