BUG $user 沒有資料造成錯誤 20250604

This commit is contained in:
allen.yan 2025-06-04 12:58:03 +08:00
parent 7c71040ef1
commit 4b617f3882

View File

@ -320,6 +320,7 @@ class RoomControlController extends Controller
}
$mainDomainUrl= $parsed['scheme'] . '://' . $mainDomain;
$user = User::find(2);
if ($user && $user->api_plain_token) {
$client = (new ApiClient($mainDomainUrl, $user->api_plain_token));
$response = $client->post($endpoint, $validated);