From fade52a49f72bad236720910af380bcb27f05f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Mon, 11 Aug 2025 13:57:36 +0200 Subject: [PATCH] billActions: projection optimization --- app/lib/actions/billActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/actions/billActions.ts b/app/lib/actions/billActions.ts index c3feb47..89a22fb 100644 --- a/app/lib/actions/billActions.ts +++ b/app/lib/actions/billActions.ts @@ -391,7 +391,7 @@ export const deleteBillById = withUser(async (user:AuthenticatedUser, locationID } ], "bills.name": bill.name - }, { projection: { bills: 0 } }) + }, { projection: { _id: 1 } }) .toArray(); // Delete the bill from all subsequent locations (by name)