From 07c985ebc3544e1a42643db7420c83bf5e12d496 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 17 Aug 2023 17:37:52 -0400 Subject: [PATCH] Fix missing params from redeploy event --- app/controllers/api/functions.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index b3375340f2..69db25ef49 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -1273,7 +1273,8 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') ->inject('dbForConsole') ->inject('project') ->inject('gitHub') - ->action(function (string $functionId, string $deploymentId, string $buildId, Request $request, Response $response, Database $dbForProject, Database $dbForConsole, Document $project, GitHub $github) use ($redeployVcs) { + ->inject('events') + ->action(function (string $functionId, string $deploymentId, string $buildId, Request $request, Response $response, Database $dbForProject, Database $dbForConsole, Document $project, GitHub $github, Event $events) use ($redeployVcs) { $function = $dbForProject->getDocument('functions', $functionId); $deployment = $dbForProject->getDocument('deployments', $deploymentId); @@ -1298,6 +1299,10 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId') $redeployVcs($request, $function, $project, $installation, $dbForProject, new Document([]), $github); + $events + ->setParam('functionId', $function->getId()) + ->setParam('deploymentId', $deployment->getId()); + $response->noContent(); });