Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(api): fix call to api on fresh install (#11536) #11537

Merged
merged 1 commit into from
Aug 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/EventSubscriber/UpdateEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ public static function getSubscribedEvents(): array
*/
public function validateCentreonWebVersionOrFail(RequestEvent $event): void
{
$this->debug('Checking if database configuration file exists to know if centreon is already installed');
if (! file_exists(_CENTREON_ETC_ . DIRECTORY_SEPARATOR . 'centreon.conf.php')) {
$this->debug('Centreon database configuration file not found');
return;
}

$this->debug('Checking if route matches updates endpoint');
if (
$event->getRequest()->getMethod() === Request::METHOD_PATCH
Expand Down