Logout now requires Authorization: Bearer <access-token>.

This commit is contained in:
2026-08-26 20:46:48 +02:00
parent 16c9c3a03f
commit b4b40e5c2c
9 changed files with 40 additions and 14 deletions
+1 -2
View File
@@ -12,8 +12,7 @@ logoutButton.addEventListener('click', async () => {
if (token) {
await fetch('/api/auth/logout', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token}),
headers: {Authorization: `Bearer ${token}`},
}).catch(() => undefined);
}