mirror of
https://github.com/xtr-dev/payload-billing.git
synced 2025-12-10 02:43:24 +00:00
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:
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user