feat: Update endpoint loading
This commit is contained in:
parent
1a7cbafd25
commit
73622278b0
@ -0,0 +1,22 @@
|
|||||||
|
from fastapi import APIRouter, Depends, HTTPException
|
||||||
|
from core.database import fake_users_db
|
||||||
|
from core.auth import get_current_user_dummy
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
@router.post("/logout")
|
||||||
|
async def logout_demo(
|
||||||
|
token: str = Depends(get_current_user_dummy)
|
||||||
|
):
|
||||||
|
"""Demo logout endpoint"""
|
||||||
|
if not token:
|
||||||
|
raise HTTPException(status_code=400, detail="No active session found")
|
||||||
|
|
||||||
|
return {
|
||||||
|
"message": "Logout successful",
|
||||||
|
"session_status": "terminated",
|
||||||
|
"metadata": {
|
||||||
|
"logout_time": "demo_timestamp",
|
||||||
|
"session_duration": "demo_duration"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user