File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace App \Http \Controllers ;
44
5+ use App \Http \Controllers \Api \Traits \ApiHelpers ;
56use App \Http \Middleware \AdminOnlyAccess ;
67use App \Models \RelaySubscription ;
78use App \Services \RelayService ;
1213
1314class 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}
Original file line number Diff line number Diff line change 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
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" >
You can’t perform that action at this time.
0 commit comments