Skip to content

Commit 838b8f0

Browse files
committed
Relay fixes
1 parent d4cb74f commit 838b8f0

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/Http/Controllers/AdminRelayController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Http\Controllers;
44

5+
use App\Http\Controllers\Api\Traits\ApiHelpers;
56
use App\Http\Middleware\AdminOnlyAccess;
67
use App\Models\RelaySubscription;
78
use App\Services\RelayService;
@@ -12,6 +13,7 @@
1213

1314
class AdminRelayController extends Controller
1415
{
16+
use ApiHelpers;
1517
protected $relayService;
1618

1719
public function __construct(RelayService $relayService)
@@ -24,7 +26,7 @@ public function index(): JsonResponse
2426
{
2527
$relays = RelaySubscription::orderBy('created_at', 'desc')->get();
2628

27-
return response()->json([
29+
return $this->data([
2830
'relays' => $relays,
2931
]);
3032
}
@@ -144,6 +146,6 @@ public function stats(): JsonResponse
144146
'total_received' => RelaySubscription::sum('total_received'),
145147
];
146148

147-
return response()->json(['stats' => $stats]);
149+
return $this->data(['stats' => $stats]);
148150
}
149151
}

resources/js/pages/admin/Relays.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@
6868
</div>
6969

7070
<div v-if="loading" class="p-6 text-center">
71-
<div
72-
class="inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"
73-
></div>
71+
<Spinner />
7472
</div>
7573

7674
<div
@@ -169,7 +167,7 @@
169167

170168
<div
171169
v-if="showAddModal"
172-
class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50"
170+
class="fixed inset-0 bg-black/80 flex items-center justify-center z-50"
173171
@click.self="showAddModal = false"
174172
>
175173
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-xl p-6 w-full max-w-md">

0 commit comments

Comments
 (0)