fix logout button
All checks were successful
Build Docker / deploy (push) Successful in 40s
Build Docker / build (push) Successful in 35s

This commit is contained in:
2026-03-19 02:57:02 +03:00
parent 54072eb87d
commit 9a259cb637

View File

@@ -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',