Files
speedBB/app/Http/Controllers/PingController.php
tracer 0b4e0df305
All checks were successful
CI/CD Pipeline / deploy (push) Successful in 26s
CI/CD Pipeline / promote_stable (push) Successful in 2s
Add ping endpoint, update-refresh prompt, and dark-mode polish
2026-02-24 18:48:54 +01:00

24 lines
554 B
PHP

<?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,
]);
}
}