feat: implement season requests management with CRUD operations and enhance UI components

This commit is contained in:
maxDorninger
2025-05-24 14:24:00 +02:00
parent f2b7f0f370
commit d2f0b8f22d
15 changed files with 253 additions and 71 deletions

View File

@@ -17,23 +17,9 @@
import {base} from '$app/paths';
import {env} from "$env/dynamic/public";
import {goto} from '$app/navigation';
import {handleLogout} from '$lib/utils.ts';
const user: () => User = getContext('user');
const sidebar = useSidebar();
const apiUrl = env.PUBLIC_API_URL;
async function handleLogout() {
const response = await fetch(apiUrl + '/auth/cookie/logout', {
method: 'POST',
credentials: 'include'
});
if (response.ok) {
console.log('Logout successful!');
await goto(base + '/login');
} else {
console.error('Logout failed:', response.status);
}
}
</script>