pellersr-u2i23h/endpoints/logout.post.py
2025-03-28 11:23:22 +01:00

11 lines
330 B
Python

# Entity: User
from fastapi import APIRouter, Depends, status
from core.auth import logout_user
from schemas.user import UserLogoutSchema
router = APIRouter()
@router.post("/logout", status_code=200, response_model=UserLogoutSchema)
async def logout(user=Depends(logout_user)):
return {"message": "Logged out successfully"}