Update code in endpoints/logoutst.post.py
This commit is contained in:
parent
4f07a1a717
commit
a535e5bb1d
@ -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"}
|
Loading…
x
Reference in New Issue
Block a user