From 818b136836fa5f7661cdb5abed69065d1fabeafe Mon Sep 17 00:00:00 2001 From: Tuan Dang Date: Fri, 10 May 2024 19:17:40 -0700 Subject: [PATCH] Make app and appId optional in update integration endpoint --- backend/src/server/routes/v1/integration-router.ts | 4 ++-- backend/src/services/integration/integration-types.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/server/routes/v1/integration-router.ts b/backend/src/server/routes/v1/integration-router.ts index fdd9cf4f4..e40e3f799 100644 --- a/backend/src/server/routes/v1/integration-router.ts +++ b/backend/src/server/routes/v1/integration-router.ts @@ -143,8 +143,8 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => { integrationId: z.string().trim().describe(INTEGRATION.UPDATE.integrationId) }), body: z.object({ - app: z.string().trim().describe(INTEGRATION.UPDATE.app), - appId: z.string().trim().describe(INTEGRATION.UPDATE.appId), + app: z.string().trim().optional().describe(INTEGRATION.UPDATE.app), + appId: z.string().trim().optional().describe(INTEGRATION.UPDATE.appId), isActive: z.boolean().describe(INTEGRATION.UPDATE.isActive), secretPath: z .string() diff --git a/backend/src/services/integration/integration-types.ts b/backend/src/services/integration/integration-types.ts index 909ab517a..50d0de762 100644 --- a/backend/src/services/integration/integration-types.ts +++ b/backend/src/services/integration/integration-types.ts @@ -33,8 +33,8 @@ export type TCreateIntegrationDTO = { export type TUpdateIntegrationDTO = { id: string; - app: string; - appId: string; + app?: string; + appId?: string; isActive?: boolean; secretPath: string; targetEnvironment: string;