diff --git a/endpoints/logout.post.py b/endpoints/logout.post.py index c4e35f4..e73e4fb 100644 --- a/endpoints/logout.post.py +++ b/endpoints/logout.post.py @@ -1,25 +1,15 @@ -from fastapi import APIRouter, Depends, HTTPException - -users = [] # In-memory storage +from fastapi import APIRouter, HTTPException router = APIRouter() @router.post("/logout") -async def logout_demo( - username: str = "logged_in_user" -): +async def logout(): """Demo logout endpoint""" if request.method != "POST": raise HTTPException(status_code=405, detail="Method Not Allowed") - user = next((u for u in users if u["username"] == username), None) - if not user: - raise HTTPException(status_code=400, detail="Invalid user") - - # Perform logout logic (e.g., invalidate token) - return { - "message": "Logout successful", "method": "POST", - "_verb": "post" + "_verb": "post", + "message": "Logout successful (demo)" } \ No newline at end of file