🚸 Change friend deny to delete the request instead of denied status
continuous-integration/drone/push Build is passing Details

master
Alix JEUDI--LEMOINE 2 months ago
parent b7cb9e85b3
commit a3c7c8ac22

@ -113,7 +113,7 @@ async def accept_friend(id: str, current_user: User = Depends(get_current_user))
)
async def deny_friend(id: str, current_user: User = Depends(get_current_user)):
try:
result = friends_collection.update_one({"_id": ObjectId(id)}, {"$set": {"status": "denied"}})
result = friends_collection.delete_one({"_id": ObjectId(id)})
except bson.errors.InvalidId:
objectid_misformatted()

Loading…
Cancel
Save