diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-07-25 14:02:33 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-07-28 11:25:16 +0200 |
| commit | e2bf350e0742724f86a131c7421fea50c839f378 (patch) | |
| tree | 983f2f903afb67298f0c5e6a1ec1fe69264879eb /app/lib | |
| parent | a196629083e1fb634a1d65e816a1b4bdfbdeb072 (diff) | |
| download | mullvadvpn-e2bf350e0742724f86a131c7421fea50c839f378.tar.xz mullvadvpn-e2bf350e0742724f86a131c7421fea50c839f378.zip | |
Added START_LOGIN action
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/backend.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/lib/backend.js b/app/lib/backend.js index 3c322afa6d..53e724fcfc 100644 --- a/app/lib/backend.js +++ b/app/lib/backend.js @@ -148,16 +148,12 @@ export class Backend { } - login(accountNumber: string) { + login(accountNumber: string): Promise<void> { log.info('Attempting to login with account number', accountNumber); - this._store.dispatch(accountActions.loginChange({ - accountNumber: accountNumber, - status: 'logging in', - error: null, - })); + this._store.dispatch(accountActions.startLogin(accountNumber)); - this._ipc.getAccountData(accountNumber) + return this._ipc.getAccountData(accountNumber) .then( response => { log.info('Account exists', response); @@ -169,6 +165,7 @@ export class Backend { this._store.dispatch(accountActions.loginChange({ status: 'ok', + accountNumber: accountNumber, paidUntil: accountData.paid_until, error: null, })); |
