Update code in endpoints/logoutst.post.py

This commit is contained in:
Backend IM Bot 2025-03-28 11:49:35 +01:00
parent 4f07a1a717
commit a535e5bb1d

View File

@ -1,8 +1,10 @@
# Entity: User # Entity: User
from fastapi import APIRouter, Depends, status from fastapi import APIRouter, Depends, HTTPException, status
from sqlalchemy.orm import Session from sqlalchemy.orm import Session
from core.database import get_db from core.database import get_db
from models.user import User
from schemas.user import UserSchema
from helpers.user_helpers import logout_user from helpers.user_helpers import logout_user
router = APIRouter() router = APIRouter()
@ -11,4 +13,5 @@ router = APIRouter()
async def logout( async def logout(
db: Session = Depends(get_db) db: Session = Depends(get_db)
): ):
return logout_user(db) logout_user(db)
return {"message": "Logged out successfully"}