Update code in endpoints/logout.post.py

This commit is contained in:
Backend IM Bot 2025-03-21 11:49:42 +00:00
parent d43bfc1530
commit a1c7f834af

View File

@ -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
}
}