Fix payment app credential search (#8235)

pull/8238/head
alannnc 2023-04-12 22:27:54 -07:00 committed by GitHub
parent cdc3833e09
commit d8218a6243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -1582,11 +1582,10 @@ async function handler(
} }
if (typeof paymentAppData.price === "number" && paymentAppData.price > 0) { if (typeof paymentAppData.price === "number" && paymentAppData.price > 0) {
/* Validate if there is any stripe_payment credential for this user */ /* Validate if there is any payment app credential for this user */
/* note: removes custom error message about stripe */
await prisma.credential.findFirstOrThrow({ await prisma.credential.findFirstOrThrow({
where: { where: {
type: "stripe_payment", appId: paymentAppData.appId,
userId: organizerUser.id, userId: organizerUser.id,
}, },
select: { select: {