[REFACTOR] 標準化 IoT API 方法並修正日期格式
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 57s

1. 將 B014 (參數下載) 與 B017 (貨道同步) 路由從 POST 改為 GET。
2. 移除 B017 冗餘的 machine 參數,改由 Bearer Token 自動識別。
3. 修正 B017 回傳資料中 expiry_date 的 ISO 8601 格式問題,統一為 Y-m-d。
4. 同步更新所有技術規格文件 (.agents/ 規範) 與 API 說明配置 (config/api-docs.php)。
This commit is contained in:
2026-04-14 16:46:35 +08:00
parent 6382709b90
commit 2702e5a655
6 changed files with 17 additions and 29 deletions

View File

@@ -196,7 +196,7 @@ class MachineController extends Controller
return [
'tid' => $slot->slot_no,
'num' => (int)$slot->stock,
'expiry_date' => $slot->expiry_date,
'expiry_date' => $slot->expiry_date ? $slot->expiry_date->format('Y-m-d') : null,
'batch_no' => $slot->batch_no,
// 保留原始欄位以供除錯或未來擴充
'product_id' => $slot->product_id,