🔧 Fixed bugs

- Fixed Set null to User on ProxyService initial;
- Fixed some WebApis have 'prefix' parameter that cause function calls not work as expect;
This commit is contained in:
BrettonYe
2023-07-08 14:26:17 +08:00
parent 4cfb0b4650
commit 4a4afa7ae6
7 changed files with 38 additions and 75 deletions

View File

@@ -289,8 +289,7 @@ class UserController extends Controller
public function exportProxyConfig(Request $request, User $user): JsonResponse
{
$proxyServer = new ProxyService;
$proxyServer->setUser($user);
$proxyServer = new ProxyService($user);
$server = $proxyServer->getProxyConfig(Node::findOrFail($request->input('id')));
return Response::json(['status' => 'success', 'data' => $proxyServer->getUserProxyConfig($server, $request->input('type') !== 'text'), 'title' => $server['type']]);