corrected old env names and fixed logout redirect
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user