fix(portal): add invitation links and correct customer login routing
This commit is contained in:
@@ -7,7 +7,6 @@ definePageMeta({
|
||||
|
||||
const auth = useAuthStore()
|
||||
const toast = useToast()
|
||||
const router = useRouter()
|
||||
|
||||
const state = reactive({
|
||||
email: '',
|
||||
@@ -22,7 +21,6 @@ const doLogin = async (event: FormSubmitEvent<typeof state>) => {
|
||||
try {
|
||||
await auth.login(event.data.email, event.data.password, event.data.rememberMe)
|
||||
toast.add({title:"Einloggen erfolgreich"})
|
||||
await router.push("/")
|
||||
} catch (err: any) {
|
||||
toast.add({title:"Zugangsdaten falsch. Bitte überprüfen Sie Ihre Eingaben",color:"error"})
|
||||
} finally {
|
||||
|
||||
@@ -27,8 +27,8 @@ const doChange = async (event: FormSubmitEvent<typeof state>) => {
|
||||
})
|
||||
|
||||
toast.add({title:"Ändern erfolgreich"})
|
||||
await auth.logout()
|
||||
return navigateTo("/login")
|
||||
await auth.fetchMe()
|
||||
return navigateTo(auth.getLandingPath(), { replace: true })
|
||||
} catch (err: any) {
|
||||
toast.add({title:"Es gab ein Problem beim ändern",color:"error"})
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user