feat: Update endpoint wahtsup

This commit is contained in:
Backend IM Bot 2025-03-12 18:20:32 +00:00
parent 798811c68f
commit 66648ec137

View File

@ -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"}