From 866fda84ed9a53b0de6cf6a77d4cadbc67ec48ca Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Fri, 28 Feb 2020 15:16:23 +0800 Subject: [PATCH] add onetime plan --- .../Controllers/Server/DeepbworkController.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Server/DeepbworkController.php b/app/Http/Controllers/Server/DeepbworkController.php index 7df2fb84..2d5b6c30 100644 --- a/app/Http/Controllers/Server/DeepbworkController.php +++ b/app/Http/Controllers/Server/DeepbworkController.php @@ -2,6 +2,7 @@ namespace App\Http\Controllers\Server; +use App\Services\ServerService; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Models\User; @@ -34,20 +35,8 @@ class DeepbworkController extends Controller abort(500, 'fail'); } Cache::put('server_last_check_at_' . $server->id, time()); - $users = User::whereIn('group_id', json_decode($server->group_id)) - ->select([ - 'id', - 'email', - 't', - 'u', - 'd', - 'transfer_enable', - 'enable', - 'v2ray_uuid', - 'v2ray_alter_id', - 'v2ray_level' - ]) - ->get(); + $serverService = new ServerService(); + $users = $serverService->getAvailableUsers(json_decode($server->group_id)); $result = []; foreach ($users as $user) { $user->v2ray_user = [