From 44eb05fb5b5f7c9906eaaa307f2355423c10af42 Mon Sep 17 00:00:00 2001 From: xboard Date: Sat, 16 Dec 2023 08:05:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dv2ray=E3=80=81Trojan?= =?UTF-8?q?=E6=97=A7=E7=89=88=E6=8E=A5=E5=8F=A3=E8=8E=B7=E5=8F=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=88=97=E8=A1=A8=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/V1/Server/DeepbworkController.php | 2 +- app/Http/Controllers/V1/Server/TrojanTidalabController.php | 2 +- app/Services/ServerService.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/V1/Server/DeepbworkController.php b/app/Http/Controllers/V1/Server/DeepbworkController.php index b0b92b9..f5f40cc 100644 --- a/app/Http/Controllers/V1/Server/DeepbworkController.php +++ b/app/Http/Controllers/V1/Server/DeepbworkController.php @@ -49,7 +49,7 @@ class DeepbworkController extends Controller "alter_id" => 0, "level" => 0, ]; - unset($user['uuid']); + unset($user->uuid); array_push($result, $user); } $eTag = sha1(json_encode($result)); diff --git a/app/Http/Controllers/V1/Server/TrojanTidalabController.php b/app/Http/Controllers/V1/Server/TrojanTidalabController.php index b5941ca..6092622 100644 --- a/app/Http/Controllers/V1/Server/TrojanTidalabController.php +++ b/app/Http/Controllers/V1/Server/TrojanTidalabController.php @@ -46,7 +46,7 @@ class TrojanTidalabController extends Controller $user->trojan_user = [ "password" => $user->uuid, ]; - unset($user['uuid']); + unset($user->uuid); array_push($result, $user); } $eTag = sha1(json_encode($result)); diff --git a/app/Services/ServerService.php b/app/Services/ServerService.php index 807ca38..5881b23 100644 --- a/app/Services/ServerService.php +++ b/app/Services/ServerService.php @@ -12,6 +12,7 @@ use App\Models\ServerVmess; use App\Models\ServerTrojan; use App\Utils\CacheKey; use App\Utils\Helper; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Cache; class ServerService @@ -161,7 +162,7 @@ class ServerService }, $servers); } - public function getAvailableUsers($groupId) + public function getAvailableUsers($groupId): Collection { return \DB::table('v2_user') ->whereIn('group_id', $groupId)