From a1c7f834af5799bee0fefbf6f6a8febda4e2ee50 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 21 Mar 2025 11:49:42 +0000 Subject: [PATCH] Update code in endpoints/logout.post.py --- endpoints/logout.post.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/endpoints/logout.post.py b/endpoints/logout.post.py index ed27c2d..2a4caf0 100644 --- a/endpoints/logout.post.py +++ b/endpoints/logout.post.py @@ -5,13 +5,18 @@ users = [] # In-memory storage router = APIRouter() @router.post("/logout") -async def logout_demo(): +async def logout_demo( + token: str = "dummy_jwt_token_123" +): """Demo logout endpoint""" + if not token: + raise HTTPException(status_code=400, detail="Invalid token") + return { "message": "Logout successful", - "session": "terminated", - "features": { - "rate_limit": 0, - "expires_in": 0 + "token": None, + "session": { + "status": "terminated", + "expires_at": 0 } } \ No newline at end of file