BUG 修正

This commit is contained in:
allen.yan 2025-06-04 16:08:43 +08:00
parent f0d9070858
commit 42bf78df8c

View File

@ -289,7 +289,7 @@ class RoomControlController extends Controller
$roomType = null;
$roomName = null;
// 從 room_name例如 PC101, SVR01中擷取 type 與 name
if (preg_match('/^([A-Za-z]+)(\d+)$/', $validated['hostname'], $matches)) {
if (preg_match('/^([A-Za-z]+)(\d+)$/', $validated['room_name'], $matches)) {
$roomType = strtolower($matches[1]); // 'PC' → 'pc'
$roomName = $matches[2]; // '101'
}