Fix web page due to recent changes in the API v1

This commit is contained in:
Josepablo Cruz Baas
2024-03-22 02:36:36 +00:00
parent cbd076e887
commit 9a27883b98
34 changed files with 264 additions and 141 deletions

View File

@@ -7,9 +7,11 @@
import Spiner from '../components/ui/Spiner.vue';
import { useRouter } from 'vue-router';
import { useNotificationsStore } from '../stores/notifications';
import { useAuthStore } from '../stores/auth';
const router = useRouter();
const notifications = useNotificationsStore()
const auth = useAuthStore();
const form = reactive({
email: '',
@@ -84,11 +86,16 @@
});
clearMessages();
notifications.$patch({
text : 'Registro exitoso, Inicie sesión!',
text : 'Registro exitoso, Complete su registro!',
show : true,
error: false
});
router.push({name: 'login'});
auth.$patch({
sesion: result.data.session_token,
token: result.data.accessToken,
user: result.data.user,
})
router.push({name: 'register-company'});
} else {
msgError.value = result.msg;
clearMessages()