Update code in endpoints/logout.post.py
This commit is contained in:
parent
d43bfc1530
commit
a1c7f834af
@ -5,13 +5,18 @@ users = [] # In-memory storage
|
|||||||
router = APIRouter()
|
router = APIRouter()
|
||||||
|
|
||||||
@router.post("/logout")
|
@router.post("/logout")
|
||||||
async def logout_demo():
|
async def logout_demo(
|
||||||
|
token: str = "dummy_jwt_token_123"
|
||||||
|
):
|
||||||
"""Demo logout endpoint"""
|
"""Demo logout endpoint"""
|
||||||
|
if not token:
|
||||||
|
raise HTTPException(status_code=400, detail="Invalid token")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"message": "Logout successful",
|
"message": "Logout successful",
|
||||||
"session": "terminated",
|
"token": None,
|
||||||
"features": {
|
"session": {
|
||||||
"rate_limit": 0,
|
"status": "terminated",
|
||||||
"expires_in": 0
|
"expires_at": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user