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

15 lines
354 B
Python

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