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