update : otp interface

This commit is contained in:
enggar_ganteng
2019-01-28 21:10:53 +07:00
parent 8b2f3ac089
commit 1156034b0e
2 changed files with 18 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import { observable, action, computed} from 'mobx';
import * as fetch from 'isomorphic-fetch';
import { resolve } from 'url';
export class Authentication {
@@ -8,7 +9,7 @@ export class Authentication {
@observable isLoggingIn = false;
@observable isInviting = false;
@observable removingUser = false;
@observable isNeedEmailVerification = false;
@observable userWallet = {};
@observable userProfile = {
email : '',
@@ -50,8 +51,10 @@ export class Authentication {
return this.http.post("authentication/login", data)
.then(res => {
this.isLoggingIn = false;
this.isNeedEmailVerification = res.need_email_verification;
this.context.setToken(res.token);
this.context.loadDataAfterLogin();
return res;
})
.catch(err => {
this.isLoggingIn = false;