diff --git a/backend/src/api/integration/helpers/gitAuthenticate.ts b/backend/src/api/integration/helpers/gitAuthenticate.ts index b53437a284..73176ccd77 100644 --- a/backend/src/api/integration/helpers/gitAuthenticate.ts +++ b/backend/src/api/integration/helpers/gitAuthenticate.ts @@ -4,6 +4,11 @@ import PermissionChecker from '../../../services/user/permissionChecker' export default async (req, res) => { new PermissionChecker(req).validateHas(Permissions.values.tenantEdit) - const payload = await new IntegrationService(req).gitConnectOrUpdate(req.body) + const integrationData = { + ...req.body, + remotes: req.body.remotes?.map((remote) => ({ url: remote, forkedFrom: null })) || [], + } + + const payload = await new IntegrationService(req).gitConnectOrUpdate(integrationData) await req.responseHandler.success(req, res, payload) }