fix(performance): 11번가 연결 테스트 — XML 아닌 응답은 실패, 성공 알림은 초록 체크
- 11번가가 200 으로 웹페이지(IP 차단 안내 등)나 XML 아닌 응답을 주면 "0건 정상"으로
오판할 수 있어 실패로 처리
- 공용 알림 창 erpAlert(msg, { tone: "ok" }) — 경고 삼각형 대신 초록 체크.
기존 호출은 그대로. 실적 연결 테스트 성공 알림에 적용
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
if (a >= 10000) return s + Math.round(a / 10000).toLocaleString("ko-KR") + "만";
|
||||
return s + fmt(a);
|
||||
}
|
||||
function alertMsg(msg) { return window.erpAlert ? window.erpAlert(msg) : Promise.resolve(window.alert(msg)); }
|
||||
function alertMsg(msg, opts) { return window.erpAlert ? window.erpAlert(msg, opts) : Promise.resolve(window.alert(msg)); }
|
||||
function confirmMsg(msg) { return window.erpConfirm ? window.erpConfirm(msg) : Promise.resolve(window.confirm(msg)); }
|
||||
|
||||
async function api(method, url, body) {
|
||||
@@ -466,7 +466,7 @@
|
||||
btn.textContent = "확인 중…";
|
||||
try {
|
||||
const res = await api("POST", "/performance/api/marketplaces/" + code + "/test", {});
|
||||
await alertMsg(name + " — " + (res.ok ? "정상 연결\n" : res.label + "\n") + res.message);
|
||||
await alertMsg(name + " — " + (res.ok ? "정상 연결\n" : res.label + "\n") + res.message, res.ok ? { tone: "ok" } : undefined);
|
||||
location.reload();
|
||||
} catch (err) {
|
||||
alertMsg(err.message);
|
||||
|
||||
Reference in New Issue
Block a user