fix: v1 api payments endpoint fix (#16264)

* Update payment validation v1

* fix for [id]
This commit is contained in:
Syed Ali Shahbaz
2024-08-19 16:29:36 +00:00
committed by GitHub
parent 680e748b7a
commit d73b84157a
+10 -3
View File
@@ -1,5 +1,12 @@
import { _PaymentModel as Payment } from "@calcom/prisma/zod";
// FIXME: Payment seems a delicate endpoint, do we need to remove anything here?
export const schemaPaymentBodyParams = Payment.omit({ id: true });
export const schemaPaymentPublic = Payment.omit({ externalId: true });
export const schemaPaymentPublic = Payment.pick({
id: true,
amount: true,
success: true,
refunded: true,
fee: true,
paymentOption: true,
currency: true,
bookingId: true,
});