Merge conflicts
This commit is contained in:
@@ -96,34 +96,28 @@
|
||||
|
||||
|
||||
<script setup>
|
||||
import { useClient } from '@/plugins/clientPlugin';
|
||||
import { useAuthStore } from '@/plugins/store/authStore';
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import FooterLayout from '@/layouts/FooterLayout.vue';
|
||||
import {authStore} from '@/plugins/store/authStore';
|
||||
import {ref} from 'vue';
|
||||
import {useRouter} from 'vue-router';
|
||||
import {useClient} from "@/plugins/clientPlugin.js";
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const client = useClient();
|
||||
const api = useClient()
|
||||
|
||||
const store = authStore();
|
||||
const router = useRouter()
|
||||
|
||||
let user = ref({});
|
||||
let errorSnackBar = ref(false);
|
||||
|
||||
const goHome = () => {
|
||||
router.push('/');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function login() {
|
||||
try {
|
||||
await authStore.login(client, user.value.email, user.value.password)
|
||||
await store.login(api, user.value.email, user.value.password)
|
||||
router.push('/');
|
||||
} catch (error) {
|
||||
errorSnackBar.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -453,4 +447,4 @@ async function login() {
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user