Skip to content

Commit 4d5d54e

Browse files
committed
push last_seen
1 parent d241969 commit 4d5d54e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use App\Models\Site;
88
use App\RemoteSite\Connection;
99
use App\Traits\ApiResponse;
10+
use Carbon\Carbon;
1011
use GuzzleHttp\Exception\ClientException;
1112
use GuzzleHttp\Exception\ServerException;
1213
use Illuminate\Http\JsonResponse;
@@ -52,6 +53,9 @@ public function register(Request $request): JsonResponse
5253

5354
$site->key = $key;
5455
$site->url = $url;
56+
$site->last_seen = Carbon::now();
57+
58+
// Fill with site info
5559
$site->fill($healthResponse->toArray());
5660

5761
$site->save();

0 commit comments

Comments
 (0)