Add setup endpoint

This commit is contained in:
Kevin Thomas
2021-11-08 00:55:21 -08:00
parent 6f6a531d69
commit 94b4215d4e
3 changed files with 21 additions and 2 deletions

View File

@@ -68,9 +68,9 @@ router.beforeEach((to, from, next) => {
next('/')
})
} else if (to.name === 'Register') {
instance.get('/users')
instance.get('/setup')
.then(response => {
if (response.data.users.length !== 0) {
if (!response.data.setup) {
next('/')
} else {
next()