refs #658. Added install fully integration
parent
1b41814883
commit
aa1da83a70
|
@ -48,6 +48,10 @@ class InstallOgLiveResponseAction extends AbstractController
|
|||
return new JsonResponse(['error' => 'OgLive not found'], Response::HTTP_NOT_FOUND);
|
||||
}
|
||||
|
||||
if ($ogLive->getStatus() === OgLiveStatus::ACTIVE) {
|
||||
return new JsonResponse(['error' => 'OgLive is already active'], Response::HTTP_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$ogLive->setStatus($details['status'] === 'success' ? OgLiveStatus::ACTIVE : OgLiveStatus::FAILED);
|
||||
$ogLive->setInstalled($details['status'] === 'success');
|
||||
$ogLive->setChecksum($result['id']);
|
||||
|
@ -60,6 +64,6 @@ class InstallOgLiveResponseAction extends AbstractController
|
|||
$this->entityManager->persist($ogLive);
|
||||
$this->entityManager->flush();
|
||||
|
||||
return new JsonResponse(data: 'Oglive updated successfully', status: Response::HTTP_OK);
|
||||
return new JsonResponse(data: sprintf('OgLive %s updated successfully', $ogLive->getChecksum()), status: Response::HTTP_OK);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue