(options, userID, verificationCode)
| 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' } |
nothing calls this directly
no test coverage detected