refs #658. Updated webhook data
testing/ogcore-api/pipeline/head This commit looks good Details

develop-jenkins
Manuel Aranda Rosales 2024-10-17 14:28:36 +02:00
parent 7e6a0a2a1b
commit 88b3d8aaa9
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ class InstallOgLiveResponseAction extends AbstractController
{
$data = json_decode($request->getContent(), true);
if (!is_array($data)) {
return new JsonResponse(['error' => 'Invalid JSON data'], Response::HTTP_BAD_REQUEST);
}
$data = $data['webhookData'];
if ($data === null || !isset($data['message'], $data['ogCoreId'], $data['status'])) {
return new JsonResponse(['error' => 'Invalid or incomplete JSON data'], Response::HTTP_BAD_REQUEST);
}