BUG 問題修正 20250528

This commit is contained in:
allen.yan 2025-05-28 11:43:38 +08:00
parent a45c139db7
commit 871a139587

View File

@ -252,9 +252,9 @@ class RoomControlController extends Controller
public function sendSwitch(SendRoomSwitchCommandRequest $request): JsonResponse public function sendSwitch(SendRoomSwitchCommandRequest $request): JsonResponse
{ {
$validated = $request->validated(); $validated = $request->validated();
$branch = Branch::where('name',$validated['branch_name'])->first();
$room = Room::where([ $room = Room::where([
['branch_name', $validated['branch_name']], ['branch_id', $branch->id],
['name', $validated['room_name']], ['name', $validated['room_name']],
])->first(); ])->first();