billActions: projection optimization

This commit is contained in:
2025-08-11 13:57:36 +02:00
parent aab0afd045
commit fade52a49f

View File

@@ -391,7 +391,7 @@ export const deleteBillById = withUser(async (user:AuthenticatedUser, locationID
} }
], ],
"bills.name": bill.name "bills.name": bill.name
}, { projection: { bills: 0 } }) }, { projection: { _id: 1 } })
.toArray(); .toArray();
// Delete the bill from all subsequent locations (by name) // Delete the bill from all subsequent locations (by name)