mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 11:20:53 +08:00
fix: sub link types not working
This commit is contained in:
@@ -45,7 +45,7 @@ class ClientController extends Controller
|
||||
|
||||
if (!$userService->isAvailable($user)) {
|
||||
HookManager::call('client.subscribe.unavailable');
|
||||
return response('', 200, ['Content-Type' => 'text/plain']);
|
||||
return response('', 403, ['Content-Type' => 'text/plain']);
|
||||
}
|
||||
|
||||
return $this->doSubscribe($request, $user);
|
||||
@@ -125,7 +125,7 @@ class ClientController extends Controller
|
||||
{
|
||||
return collect($servers)->filter(function ($server) use ($allowedTypes, $filterKeywords) {
|
||||
// Condition 1: Server type must be in the list of allowed types
|
||||
if (!in_array($server['type'], $allowedTypes)) {
|
||||
if ($allowedTypes && !in_array($server['type'], $allowedTypes)) {
|
||||
return false; // Filter out (don't keep)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user