Skip to content

Commit e662dc2

Browse files
authored
fix: connect git integration payload (CM-756) (#3544)
1 parent 67dbdda commit e662dc2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

backend/src/api/integration/helpers/gitAuthenticate.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import PermissionChecker from '../../../services/user/permissionChecker'
44

55
export default async (req, res) => {
66
new PermissionChecker(req).validateHas(Permissions.values.tenantEdit)
7-
const payload = await new IntegrationService(req).gitConnectOrUpdate(req.body)
7+
const integrationData = {
8+
...req.body,
9+
remotes: req.body.remotes?.map((remote) => ({ url: remote, forkedFrom: null })) || [],
10+
}
11+
12+
const payload = await new IntegrationService(req).gitConnectOrUpdate(integrationData)
813
await req.responseHandler.success(req, res, payload)
914
}

0 commit comments

Comments
 (0)