mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-06 08:01:31 +00:00
Settings polishing, logout button
This commit is contained in:
parent
9b378a6579
commit
181135f58a
34 changed files with 256 additions and 154 deletions
15
python/api/logout.py
Normal file
15
python/api/logout.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from python.helpers.api import ApiHandler, Request, session
|
||||
|
||||
|
||||
class ApiLogout(ApiHandler):
|
||||
@classmethod
|
||||
def requires_auth(cls) -> bool:
|
||||
return False
|
||||
|
||||
async def process(self, input: dict, request: Request) -> dict:
|
||||
try:
|
||||
session.clear()
|
||||
except Exception:
|
||||
session.pop("authentication", None)
|
||||
session.pop("csrf_token", None)
|
||||
return {"ok": True}
|
||||
Loading…
Add table
Add a link
Reference in a new issue