mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-21 16:25:36 +02:00
feat: implement season requests management with CRUD operations and enhance UI components
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user