Implemented actual authentication guards, began implementing main login user flows
This commit is contained in:
@@ -16,13 +16,14 @@ import AlertDescription from './components/ui/alert/AlertDescription.vue';
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
onMounted(async () => {
|
||||
const res = await fetch(`${import.meta.env.VITE_APIHOST}/members/me`, {
|
||||
credentials: 'include',
|
||||
});
|
||||
const data = await res.json();
|
||||
userStore.user = data;
|
||||
});
|
||||
// onMounted(async () => {
|
||||
// const res = await fetch(`${import.meta.env.VITE_APIHOST}/members/me`, {
|
||||
// credentials: 'include',
|
||||
// });
|
||||
// const data = await res.json();
|
||||
// console.log(data);
|
||||
// userStore.user = data;
|
||||
// });
|
||||
|
||||
async function logout() {
|
||||
await fetch(`${import.meta.env.VITE_APIHOST}/logout`, {
|
||||
|
||||
Reference in New Issue
Block a user