From 2a8b412f23fa4751c067a64236fa7f8d7f2e87e2 Mon Sep 17 00:00:00 2001 From: Alexis Feron Date: Thu, 19 Jun 2025 18:56:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=EF=B8=8F=20Fix=20user=5Fid=20on=20?= =?UTF-8?q?the=20pin=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/routes/pins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/pins.py b/app/routes/pins.py index 2eaf08e..f7af6d4 100644 --- a/app/routes/pins.py +++ b/app/routes/pins.py @@ -80,7 +80,7 @@ async def update_pin(id: str, pin: PinDTO, current_user: User = Depends(get_curr raise HTTPException(status_code=403, detail="You don't have permission to edit this pin") # Ajouter l'ID de l'utilisateur au PinDTO - pin.user_id = current_user.uid + pin.user_id = existing_pin.user_id # Mettre à jour le pin pins_collection.update_one({"_id": ObjectId(id)}, {"$set": pin.model_dump()})