feat: Update endpoint wahtsup
This commit is contained in:
parent
798811c68f
commit
66648ec137
@ -0,0 +1,17 @@
|
|||||||
|
from fastapi import APIRouter, Depends, HTTPException, status
|
||||||
|
from sqlalchemy.orm import Session
|
||||||
|
from app.db import get_db
|
||||||
|
from app.models import User
|
||||||
|
from app.auth import get_current_user
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
@router.post("/logout", status_code=status.HTTP_200_OK)
|
||||||
|
async def logout(current_user: User = Depends(get_current_user), db: Session = Depends(get_db)):
|
||||||
|
"""
|
||||||
|
Logout the current user.
|
||||||
|
"""
|
||||||
|
# Invalidate the user's token or session
|
||||||
|
# Implement your logout logic here
|
||||||
|
|
||||||
|
return {"message": "Logged out successfully"}
|
Loading…
x
Reference in New Issue
Block a user