Новые правки сайта
This commit is contained in:
parent
cd8da6b3b8
commit
48c750db0d
3 changed files with 9 additions and 3 deletions
|
|
@ -520,9 +520,12 @@ import { COMPANY } from "@constants";
|
|||
try {
|
||||
await fetch('/api/auth/logout', { method: 'POST' });
|
||||
} catch (e) {}
|
||||
// Очищаем localStorage
|
||||
localStorage.removeItem('auth_token');
|
||||
localStorage.removeItem('user');
|
||||
localStorage.removeItem('pocketbase_auth');
|
||||
// Удаляем cookie pb_auth
|
||||
document.cookie = 'pb_auth=; path=/; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT';
|
||||
document.querySelector('.header-right')?.classList.remove('auth-active');
|
||||
window.location.reload();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue