Fixed integrations config being empty

This commit is contained in:
Henry Whitaker
2020-12-13 16:29:05 +00:00
parent e9de226c7a
commit 0910bbb757
4 changed files with 16 additions and 8 deletions

View File

@@ -35,18 +35,20 @@ class IntegrationsServiceProvider extends ServiceProvider
*/
public function boot()
{
if(File::exists(env('DB_DATABASE'))) {
if(Schema::hasTable('settings')) {
if (File::exists(env('DB_DATABASE'))) {
if (Schema::hasTable('settings')) {
$setting = SettingsHelper::get('healthchecks_uuid');
if($setting !== false) {
if ($setting !== false) {
try {
App::bind('healthcheck', function() use ($setting) {
SettingsHelper::loadIntegrationConfig();
App::bind('healthcheck', function () use ($setting) {
return new Healthchecks($setting->value);
});
} catch(InvalidUuidStringException $e) {
} catch (InvalidUuidStringException $e) {
Log::error('Invalid healthchecks UUID');
} catch(Exception $e) {
} catch (Exception $e) {
Log::error($e->getMessage());
}
}