Update code in endpoints/logout.post.py
This commit is contained in:
parent
d0a4b0b8b5
commit
8f61537048
@ -1,6 +1,6 @@
|
|||||||
# 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 models.user import User
|
||||||
@ -15,4 +15,4 @@ async def logout(
|
|||||||
current_user: User = Depends(get_current_user)
|
current_user: User = Depends(get_current_user)
|
||||||
):
|
):
|
||||||
logout_user(db, current_user)
|
logout_user(db, current_user)
|
||||||
return {"message": "Logged out successfully"}
|
return {"message": "Logout successful"}
|
Loading…
x
Reference in New Issue
Block a user