11 lines
376 B
Python
11 lines
376 B
Python
from fastapi import APIRouter, Depends, HTTPException, status
|
|
from core.security import logout_user
|
|
from core.auth import get_current_active_user
|
|
|
|
router = APIRouter()
|
|
|
|
@router.post("/logout", status_code=200)
|
|
async def logout(current_user=Depends(get_current_active_user)):
|
|
"""Logout user"""
|
|
logout_user(current_user)
|
|
return {"message": "Logged out successfully"} |