Fix check-auth middleware
This commit is contained in:
parent
437644584a
commit
7eb546703f
File diff suppressed because it is too large
Load Diff
|
@ -39,13 +39,11 @@
|
|||
|
||||
<script>
|
||||
import { inputProps, useFormInput } from './useFormInput.js'
|
||||
import InputLabel from './components/InputLabel.vue'
|
||||
import InputHelp from './components/InputHelp.vue'
|
||||
import InputWrapper from './components/InputWrapper.vue'
|
||||
|
||||
export default {
|
||||
name: 'TextInput',
|
||||
components: { InputWrapper, InputHelp, InputLabel },
|
||||
components: { InputWrapper },
|
||||
|
||||
props: {
|
||||
...inputProps,
|
||||
|
|
|
@ -41,11 +41,12 @@ export default async (to, from, next) => {
|
|||
store.getters['auth/token'] !== undefined
|
||||
) {
|
||||
try {
|
||||
const user = await store.dispatch('auth/fetchUser')
|
||||
initCrisp(user)
|
||||
initSentry(user)
|
||||
store.dispatch('auth/fetchUser').then((user) => {
|
||||
initCrisp(user)
|
||||
initSentry(user)
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e, 'error')
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
next()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import store from '~/store'
|
||||
|
||||
export default async (to, from, next) => {
|
||||
/* if (store.getters['auth/check'] && store.getters['auth/user'].workspaces_count === 0) {
|
||||
if (store.getters['auth/check'] && store.getters['auth/user'].workspaces_count === 0) {
|
||||
if ([
|
||||
'forms.create',
|
||||
'forms.show',
|
||||
|
@ -10,8 +10,9 @@ export default async (to, from, next) => {
|
|||
].includes(to.name)
|
||||
) {
|
||||
next({ name: 'onboarding' })
|
||||
return
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
next()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue