diff --git a/endpoints/logout.post.py b/endpoints/logout.post.py index 150fa0b..da6a26a 100644 --- a/endpoints/logout.post.py +++ b/endpoints/logout.post.py @@ -1,6 +1,6 @@ # Entity: User -from fastapi import APIRouter, Depends, HTTPException, status +from fastapi import APIRouter, Depends, status from sqlalchemy.orm import Session from core.database import get_db from models.user import User @@ -11,7 +11,8 @@ router = APIRouter() @router.post("/logout", status_code=200) async def logout( - db: Session = Depends(get_db) + db: Session = Depends(get_db), + current_user: User = Depends(get_current_user) ): - logout_user(db) + logout_user(db, current_user) return {"message": "Logged out successfully"} \ No newline at end of file