2025-03-29 11:41:25 +00:00

16 lines
453 B
Python

from fastapi import APIRouter, Depends, HTTPException, status
from sqlalchemy.orm import Session
from core.database import get_db
from models.user import User
from schemas.user import UserSchema
from helpers.auth_helpers import logout_user
router = APIRouter()
@router.post("/logoutins", status_code=200)
async def logout(
db: Session = Depends(get_db)
):
"""Logout user"""
logout_user(db)
return {"message": "Successfully logged out"}