Skip to content

Commit

Permalink
fix: 修复一些主题用户获取节点为空的问题,取消节点API未找到节点的日志记录
Browse files Browse the repository at this point in the history
  • Loading branch information
xboard committed Jan 14, 2024
1 parent 8e57bc4 commit 68d7d64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/V1/Server/UniProxyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Http\Controllers\V1\Server;

use App\Exceptions\ApiException;
use App\Http\Controllers\Controller;
use App\Services\ServerService;
use App\Services\UserService;
Expand All @@ -25,8 +26,7 @@ public function __construct(ServerService $serverService, Request $request)
$this->nodeType = $request->input('node_type');
$this->nodeInfo = $this->serverService->getServer($this->nodeId, $this->nodeType);
if(!$this->nodeInfo) {
Log::channel("daily")->info("$this->nodeId $this->nodeType $this->nodeInfo");
throw new \Exception('server is not exist', 500);
throw new ApiException('server is not exist', 500);
};
}

Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/V1/User/ServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function fetch(Request $request)
$data = NodeResource::collection($servers);
return response([
'data' => $data
])->header('ETag', "\"{$eTag}\"")
->header('Cache-Control', 'public, max-age=3600');
])->header('ETag', "\"{$eTag}\"");
}
}

0 comments on commit 68d7d64

Please sign in to comment.