do not return strings, but int

This commit is contained in:
socksprox
2025-11-29 15:10:06 +01:00
parent 0446f88e9e
commit c327fecb49
2 changed files with 14 additions and 2 deletions
@@ -29,7 +29,12 @@ class StatController extends Controller
->where('record_at', '>=', $startDate)
->groupBy(['user_id', 'server_rate', 'record_at', 'record_type'])
->orderBy('record_at', 'DESC')
->get();
->get()
->map(function ($item) {
$item->u = (int) $item->u;
$item->d = (int) $item->d;
return $item;
});
$data = TrafficLogResource::collection($records);
return $this->success($data);