Add login form validation
- Sending incorrect credentials returns a 401 and we don't want the page
to redirect if we are trying to login. Wrapped the redirect in an if
block.
- Returning a promise used by the logout action, which is needed
when not redirecting the page. Didn't add to the if block since
other errors that use the router to redirect will need the Promise
returned also, e.g. 403.
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I6db706ef7c71ed13baed95dc4264e6ae11d13ad3
diff --git a/src/main.js b/src/main.js
index 023c24e..b69c659 100644
--- a/src/main.js
+++ b/src/main.js
@@ -4,6 +4,7 @@
import store from './store';
import { dateFilter } from 'vue-date-fns';
import {
+ AlertPlugin,
BadgePlugin,
ButtonPlugin,
CollapsePlugin,
@@ -24,6 +25,7 @@
Vue.filter('date', dateFilter);
+Vue.use(AlertPlugin);
Vue.use(BadgePlugin);
Vue.use(ButtonPlugin);
Vue.use(CollapsePlugin);