corrected old env names and fixed logout redirect

This commit is contained in:
2025-11-22 15:41:22 -05:00
parent ac3792c72b
commit 0e4725d33c
5 changed files with 14 additions and 13 deletions

View File

@@ -27,12 +27,13 @@ const userStore = useUserStore();
const APIHOST = import.meta.env.VITE_APIHOST;
async function logout() {
await fetch(`${APIHOST}/logout`, {
method: 'POST',
credentials: 'include',
});
// await fetch(`${APIHOST}/logout`, {
// method: 'GET',
// credentials: 'include',
// });
userStore.user = null;
window.location.href = APIHOST + "/logout";
}
function formatDate(dateStr) {

View File

@@ -2,7 +2,7 @@ import { useUserStore } from '@/stores/user'
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
history: createWebHistory(import.meta.env.VITE_APIHOST),
routes: [
// PUBLIC
{ path: '/join', component: () => import('@/pages/Join.vue') },