From d3c2e9db1f474bd58fe8685fbd08908967d8e6d4 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 30 May 2024 22:33:37 +0530 Subject: [PATCH] Add comment for clarity --- app/controllers/api/functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index 624451723e..7ad6e95cd1 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1470,6 +1470,8 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/build') throw new Exception(Exception::DEPLOYMENT_NOT_FOUND); } + // buildId is added as param just for backward compatibility + // It is fetched from the deployments collection and not from the request as the user doesn't have to know the buildId $buildId = $deployment->getAttribute('buildId', ''); $build = Authorization::skip(fn () => $dbForProject->getDocument('builds', $buildId));