fix logout button
This commit is contained in:
@@ -6,7 +6,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
.catch(() => { window.location.href = '/'; });
|
||||
|
||||
// Logout — удаляем cookie на бэкенде
|
||||
document.getElementById('logoutForm').addEventListener('submit', async function(e) {
|
||||
document.getElementById('logoutForm').addEventListener('logout', async function(e) {
|
||||
e.preventDefault();
|
||||
await fetch('/api/logout', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user