From 1efdd29bb6705ad3cf781b7ff805a6a3a6ac5673 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 13 Apr 2023 22:47:25 +0530 Subject: [PATCH] Added vcsInstallationInternalId as attribute --- app/config/collections.php | 11 +++++++++++ app/controllers/api/functions.php | 2 ++ 2 files changed, 13 insertions(+) diff --git a/app/config/collections.php b/app/config/collections.php index 200a972f64..80df6d6011 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -566,6 +566,17 @@ $collections = [ 'array' => false, 'filters' => [] ], + [ + '$id' => ID::custom('vcsInstallationInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [] + ], [ '$id' => ID::custom('projectId'), 'type' => Database::VAR_STRING, diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 19623a7c54..39bb9f3863 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -533,6 +533,7 @@ App::put('/v1/functions/:functionId') Query::limit(100), ]); $vcsInstallationsId = $vcsInstallations->getId(); + $vcsInstallationInternalId = $vcsInstallations->getInternalId(); //Add document in VCS map collection $vcs_repos = new Document([ @@ -543,6 +544,7 @@ App::put('/v1/functions/:functionId') Permission::delete(Role::any()), ], 'vcsInstallationId' => $vcsInstallationsId, + 'vcsInstallationInternalId' => $vcsInstallationInternalId, 'projectId' => $project->getId(), 'projectInternalId' => $projectInternalId, 'repositoryId' => $repositoryId,