15 lines
354 B
Python
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"
|
|
} |