summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/StartPageSetup.vue
diff options
context:
space:
mode:
authorJannik Schönartz2019-02-26 03:46:36 +0100
committerJannik Schönartz2019-02-26 03:46:36 +0100
commitcf1b40542c41b3c78e83650e4e73e596c85ff160 (patch)
treed10d2f5061815e95fc56e43f1675eb127416e255 /webapp/src/components/StartPageSetup.vue
parent[webapp/groups] fix wrong tabbar color (diff)
downloadbas-cf1b40542c41b3c78e83650e4e73e596c85ff160.tar.gz
bas-cf1b40542c41b3c78e83650e4e73e596c85ff160.tar.xz
bas-cf1b40542c41b3c78e83650e4e73e596c85ff160.zip
[account] Fix for the changePassword method
User upadate changes didn't hashed the new password correctly changePassword from promises reworked to async / await (much cleaner) Check weather the usertable is empty is now a get request and not mixed in the post request
Diffstat (limited to 'webapp/src/components/StartPageSetup.vue')
-rw-r--r--webapp/src/components/StartPageSetup.vue4
1 files changed, 3 insertions, 1 deletions
diff --git a/webapp/src/components/StartPageSetup.vue b/webapp/src/components/StartPageSetup.vue
index 8d41f81..36ad648 100644
--- a/webapp/src/components/StartPageSetup.vue
+++ b/webapp/src/components/StartPageSetup.vue
@@ -72,12 +72,14 @@ export default {
},
beforeRouteEnter (to, from, next) {
// If there are already users in the db, redirect to the login page.
- Vue.prototype.$http.post('/api/authentication/setup').then(result => {
+ Vue.prototype.$http.get('/api/authentication/setup').then(result => {
if (result.data.status !== 'SUCCESS') {
next({ name: 'login' })
} else {
next()
}
+ }).catch(() => {
+ next({ name: 'login' })
})
}
}