mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 02:43:24 +00:00
fix: Simplify PayloadCMS query structure for optimistic locking
- Remove complex 'and' clause structure that caused type issues - Use direct field matching in where clause for better compatibility - Maintain atomic optimistic locking functionality - Fix TypeScript compilation errors in updateMany operation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -68,10 +68,8 @@ export async function updatePaymentStatus(
|
||||
const result = await payload.updateMany({
|
||||
collection: paymentsCollection,
|
||||
where: {
|
||||
and: [
|
||||
{ id: { equals: paymentId } },
|
||||
{ version: { equals: currentPayment.version || 1 } }
|
||||
]
|
||||
id: { equals: paymentId },
|
||||
version: { equals: currentPayment.version || 1 }
|
||||
},
|
||||
data: {
|
||||
status,
|
||||
|
||||
Reference in New Issue
Block a user