mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-27 19:30:15 +08:00
fix: patch_gateway_origins 移至 paired 检查前,修复已配对设备跳过写入 origins 的 bug
This commit is contained in:
@@ -44,6 +44,9 @@ pub fn auto_pair_device() -> Result<String, String> {
|
||||
serde_json::json!({})
|
||||
};
|
||||
|
||||
// 无论是否已配对,都确保 gateway.controlUi.allowedOrigins 已写入
|
||||
patch_gateway_origins();
|
||||
|
||||
// 检查设备是否已配对
|
||||
if paired.get(&device_id).is_some() {
|
||||
return Ok("设备已配对".into());
|
||||
|
||||
Reference in New Issue
Block a user