From d73b84157aca3f8ec0ba1a6095c673fc0f2e8ec4 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:29:36 +0400 Subject: [PATCH] fix: v1 api payments endpoint fix (#16264) * Update payment validation v1 * fix for [id] --- apps/api/v1/lib/validations/payment.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/api/v1/lib/validations/payment.ts b/apps/api/v1/lib/validations/payment.ts index 32c5d8d641..8c3b08413b 100644 --- a/apps/api/v1/lib/validations/payment.ts +++ b/apps/api/v1/lib/validations/payment.ts @@ -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, +});