修复 bug
This commit is contained in:
@@ -84,10 +84,10 @@ async function fetchAndValidateCurve(brand, name, form, timeout = 20000) {
|
||||
if (!brand || !name) return [false, '品牌名称或型号名称为空'];
|
||||
|
||||
const target = curveTargetForForm(form);
|
||||
if (!target) return [false, '佩戴方式须为入耳式(in-ear)或头戴式(over-ear)才能校验曲线'];
|
||||
if (!target) return [false, '佩戴方式须为入耳式(in-ear)或头戴式(over-ear)才能校验曲线!'];
|
||||
|
||||
const params = new URLSearchParams({ brand, name, target });
|
||||
const url = `${LUXSIN_CURVE_API_BASE}?${params.toString()}`;
|
||||
const qs = `brand=${encodeURIComponent(brand)}&name=${encodeURIComponent(name)}&target=${encodeURIComponent(target)}`;
|
||||
const url = `${LUXSIN_CURVE_API_BASE}?${qs}`;
|
||||
|
||||
logger.info(`getCurve request: brand=${brand}, name=${name}, form=${form}, target=${target}, url=${url}`);
|
||||
|
||||
|
||||
@@ -102,6 +102,8 @@ upload_path() {
|
||||
|
||||
if [[ -d "$local_full" ]]; then
|
||||
info "上传目录: ${rel_path}/ → ${SERVER}:${remote_path}/"
|
||||
# 先删除远程同名目录,避免 scp 将目录嵌套到已有目录内
|
||||
ssh $SSH_OPTS "$SERVER" "rm -rf '${remote_path}'"
|
||||
scp $SCP_OPTS -r "$local_full" "${SERVER}:${remote_path}"
|
||||
else
|
||||
info "上传文件: ${rel_path} → ${SERVER}:${remote_path}"
|
||||
|
||||
Reference in New Issue
Block a user