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

Method success

app/views/teachers/RequestQuoteView.js:355–385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

353 return application.gplusHandler.loadAPI({
354 context: this,
355 success () {
356 btn.attr('disabled', false)
357 return application.gplusHandler.connect({
358 context: this,
359 elementId: 'google-login-button-ctav',
360 success (resp) {
361 if (resp == null) { resp = {} }
362 btn.find('.sign-in-blurb').text($.i18n.t('signup.creating'))
363 btn.attr('disabled', true)
364 return application.gplusHandler.loadPerson({
365 resp,
366 context: this,
367 success (gplusAttrs) {
368 me.set(gplusAttrs)
369 return me.save(null, {
370 url: `/db/user?gplusID=${gplusAttrs.gplusID}&gplusAccessToken=${application.gplusHandler.token()}`,
371 type: 'PUT',
372 success () {
373 if (window.tracker != null) {
374 window.tracker.trackEvent('Teachers Request Demo Create Account Google', { category: 'Teachers' })
375 }
376 application.router.navigate(SIGNUP_REDIRECT)
377 return window.location.reload()
378 },
379 error: errors.showNotyNetworkError
380 })
381 }
382 })
383 }
384 })
385 }
386 })
387 }
388

Callers

nothing calls this directly

Calls 8

navigateMethod · 0.80
reloadMethod · 0.80
connectMethod · 0.45
loadPersonMethod · 0.45
setMethod · 0.45
saveMethod · 0.45
tokenMethod · 0.45
trackEventMethod · 0.45

Tested by

no test coverage detected