diff --git a/scripts/api.py b/scripts/api.py index e0f1d6d..7da8df4 100644 --- a/scripts/api.py +++ b/scripts/api.py @@ -34,7 +34,6 @@ from apscheduler.triggers.cron import CronTrigger load_dotenv(Path.home() / "aaronai" / ".env") MEMORY_PATH = Path.home() / "aaronai" / "memory.md" -DB_PATH = str(Path.home() / "aaronai" / "db") CONVERSATIONS_DB = str(Path.home() / "aaronai" / "conversations.db") SETTINGS_PATH = Path.home() / "aaronai" / "settings.json" WATCHER_LOG = str(Path.home() / "aaronai" / "watcher.log") @@ -382,7 +381,7 @@ async def logout(request: Request, response: Response): @app.get("/auth/check") async def check_auth(request: Request): token = get_session(request) - if not token or token not in SESSIONS: + if not token or not session_exists(token): return JSONResponse({"authenticated": False}) return JSONResponse({"authenticated": True})