MCPcopy Index your code
hub / github.com/codecombat/codecombat / constructor

Method constructor

app/views/user/EmailVerifiedView.js:24–40  ·  view source on GitHub ↗
(options, userID, verificationCode)

Source from the content-addressed store, hash-verified

22 }
23
24 constructor (options, userID, verificationCode) {
25 super(...arguments)
26 this.userID = userID
27 this.verificationCode = verificationCode
28 this.state = new State(this.getInitialState())
29 this.user = new User({ _id: this.userID })
30 this.user.sendVerificationCode(this.verificationCode)
31
32 this.listenTo(this.state, 'change', this.render)
33 this.listenTo(this.user, 'email-verify-success', function () {
34 this.state.set({ verifyStatus: 'success' })
35 return me.fetch()
36 })
37 this.listenTo(this.user, 'email-verify-error', function () {
38 return this.state.set({ verifyStatus: 'error' })
39 })
40 }
41
42 getInitialState () {
43 return { verifyStatus: 'pending' }

Callers

nothing calls this directly

Calls 4

getInitialStateMethod · 0.95
sendVerificationCodeMethod · 0.80
setMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected