Skip to content

Commit d241969

Browse files
committed
fix nullable error on write
1 parent c8f54ac commit d241969

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Http/Controllers/Api/V1/SiteController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function register(Request $request): JsonResponse
4040

4141
// Do a health check
4242
try {
43-
$connectionService->checkHealth();
43+
$healthResponse = $connectionService->checkHealth();
4444
} catch (ServerException $e) {
4545
return $this->error($e->getMessage(), 500);
4646
} catch (ClientException|\Exception $e) {
@@ -52,6 +52,7 @@ public function register(Request $request): JsonResponse
5252

5353
$site->key = $key;
5454
$site->url = $url;
55+
$site->fill($healthResponse->toArray());
5556

5657
$site->save();
5758

0 commit comments

Comments
 (0)