diff --git a/app/Console/Commands/Test.php b/app/Console/Commands/Test.php index 3cee37fda..f3d14a6a5 100644 --- a/app/Console/Commands/Test.php +++ b/app/Console/Commands/Test.php @@ -100,17 +100,8 @@ public function __construct() */ public function handle() { - $url = "http://127.0.0.1:7777/list-seeder-leecher-count"; - $idArr = [8, 12]; - $client = new Client(); - $response = $client->post($url, ['json' => ['torrent_ids' => $idArr]]); - $result = json_decode((string)$response->getBody(), true); - dump($result); - if (!isset($result['ret']) || $result['ret'] != 0) { - echo "Bad"; - } else { - echo "OK"; - } + $ip = "116.77.75.254"; + $this->info(inet_pton($ip)); } } diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php index 3fd98ef69..198034de1 100644 --- a/app/Filament/Pages/Dashboard.php +++ b/app/Filament/Pages/Dashboard.php @@ -1,7 +1,32 @@ user()->id ?? 0; } +function get_user_passkey() +{ + if (IN_NEXUS) { + global $CURUSER; + return $CURUSER["passkey"] ?? ""; + } + return auth()->user()->passkey ?? ""; +} + function get_pure_username() { if (IN_NEXUS) {