From 1feeb3a584e6d4ed9ad8fce9dd3cf6394389c53b Mon Sep 17 00:00:00 2001 From: Guillaume Vincent Date: Thu, 24 Mar 2016 09:58:51 +0100 Subject: [PATCH] update login workflow --- src/app/Login.vue | 10 ++++---- src/landing-page/LoginBar/LoginBar.vue | 2 +- src/router.js | 22 ++++++++--------- src/services/auth.js | 43 +++++++--------------------------- 4 files changed, 26 insertions(+), 51 deletions(-) diff --git a/src/app/Login.vue b/src/app/Login.vue index b830f16..73b49fa 100644 --- a/src/app/Login.vue +++ b/src/app/Login.vue @@ -52,12 +52,12 @@ password: this.credentials.password, }; auth.login(credentials) - .then(() => { + .then((data) => { + console.log('Request succeeded with JSON response', data); router.go('/app/'); - }) - .catch(() => { - logging.error(this.$t('login.credentials_invalids')); - }); + }).catch((error) => { + console.log('Request failed', error); + }); }, }, }; diff --git a/src/landing-page/LoginBar/LoginBar.vue b/src/landing-page/LoginBar/LoginBar.vue index 42e9012..9e365b3 100644 --- a/src/landing-page/LoginBar/LoginBar.vue +++ b/src/landing-page/LoginBar/LoginBar.vue @@ -20,7 +20,7 @@