telin-76ei1o/endpoints/logout.post.py
2025-03-24 09:23:41 +01:00

15 lines
366 B
Python

from fastapi import APIRouter, HTTPException
router = APIRouter()
@router.post("/logout")
async def logout():
"""Demo logout endpoint"""
if request.method != "POST":
raise HTTPException(status_code=405, detail="Method Not Allowed")
return {
"method": "POST",
"_verb": "post",
"message": "Logout successful (demo)"
}