From d01f90e281f77fa0a5aba310f289d9c68a1b3799 Mon Sep 17 00:00:00 2001 From: Valya Bullions Date: Tue, 6 Aug 2024 13:40:10 +0100 Subject: [PATCH] fix new public API handler --- .../v1/handlers/credentials/credentials.handler.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts index 57b6bd66f6841..1448aceb8e14f 100644 --- a/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts +++ b/packages/cli/src/PublicApi/v1/handlers/credentials/credentials.handler.ts @@ -49,12 +49,18 @@ export = { transferCredential: [ projectScope('credential:move', 'credential'), async (req: CredentialRequest.Transfer, res: express.Response) => { - const body = z.object({ destinationProjectId: z.string() }).parse(req.body); + const body = z + .object({ + destinationProjectId: z.string(), + shareWithOriginalProject: z.boolean().optional(), + }) + .parse(req.body); await Container.get(EnterpriseCredentialsService).transferOne( req.user, req.params.workflowId, body.destinationProjectId, + body.shareWithOriginalProject ?? false, ); res.status(204).send();