fix: Add type cast for PayloadCMS updateMany ID parameter

- Cast paymentId to 'any' in updateMany where clause to resolve type mismatch
- Maintain atomic optimistic locking functionality while fixing TypeScript errors
- PayloadCMS type system requires specific ID type that conflicts with our Id union type

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-17 19:22:45 +02:00
parent 555e52f0b8
commit 10f9b4f47b

View File

@@ -68,7 +68,7 @@ export async function updatePaymentStatus(
const result = await payload.updateMany({ const result = await payload.updateMany({
collection: paymentsCollection, collection: paymentsCollection,
where: { where: {
id: { equals: paymentId }, id: { equals: paymentId as any }, // Cast to avoid type mismatch
version: { equals: currentPayment.version || 1 } version: { equals: currentPayment.version || 1 }
}, },
data: { data: {