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>
|
<script>
|
||||||
import { inputProps, useFormInput } from './useFormInput.js'
|
import { inputProps, useFormInput } from './useFormInput.js'
|
||||||
import InputLabel from './components/InputLabel.vue'
|
|
||||||
import InputHelp from './components/InputHelp.vue'
|
|
||||||
import InputWrapper from './components/InputWrapper.vue'
|
import InputWrapper from './components/InputWrapper.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TextInput',
|
name: 'TextInput',
|
||||||
components: { InputWrapper, InputHelp, InputLabel },
|
components: { InputWrapper },
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
...inputProps,
|
...inputProps,
|
||||||
|
|
|
@ -41,11 +41,12 @@ export default async (to, from, next) => {
|
||||||
store.getters['auth/token'] !== undefined
|
store.getters['auth/token'] !== undefined
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const user = await store.dispatch('auth/fetchUser')
|
store.dispatch('auth/fetchUser').then((user) => {
|
||||||
initCrisp(user)
|
initCrisp(user)
|
||||||
initSentry(user)
|
initSentry(user)
|
||||||
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e, 'error')
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
next()
|
next()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import store from '~/store'
|
import store from '~/store'
|
||||||
|
|
||||||
export default async (to, from, next) => {
|
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 ([
|
if ([
|
||||||
'forms.create',
|
'forms.create',
|
||||||
'forms.show',
|
'forms.show',
|
||||||
|
@ -10,8 +10,9 @@ export default async (to, from, next) => {
|
||||||
].includes(to.name)
|
].includes(to.name)
|
||||||
) {
|
) {
|
||||||
next({ name: 'onboarding' })
|
next({ name: 'onboarding' })
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue