Add ping endpoint, update-refresh prompt, and dark-mode polish
This commit is contained in:
23
app/Http/Controllers/PingController.php
Normal file
23
app/Http/Controllers/PingController.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
class PingController extends Controller
|
||||
{
|
||||
public function __invoke(): JsonResponse
|
||||
{
|
||||
$build = Setting::query()->where('key', 'build')->value('value');
|
||||
$reportedBuild = $build !== null ? ((int) $build) + 1 : 1;
|
||||
|
||||
return response()->json([
|
||||
'connect' => 'ok',
|
||||
'version_status' => [
|
||||
'build' => $reportedBuild,
|
||||
],
|
||||
'notification_state' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user