Send-test uses form auth values directly (no save required)
build-and-push / docker (push) Has been cancelled

The "send test" button now passes the currently typed token / login /
password to /api/test, falling back to saved defaults. Previously the
test only used saved settings, so testing before clicking Save sent no
auth and failed with 403 on access-controlled ntfy servers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
dimon
2026-06-02 22:04:05 +08:00
parent e696537fe1
commit f8d2c31658
3 changed files with 17 additions and 6 deletions
+5 -1
View File
@@ -435,7 +435,11 @@ $("#test-btn").onclick = async () => {
if (!topic) { toast(t("toast.needTestTopic"), "err"); return; }
try {
const r = await api("POST", "/api/test", {
server: sForm.default_ntfy_server.value.trim(), topic,
server: sForm.default_ntfy_server.value.trim(),
topic,
token: sForm.default_ntfy_token.value.trim(),
username: sForm.default_ntfy_username.value.trim(),
password: sForm.default_ntfy_password.value,
});
toast(t("toast.sentTo", { dest: r.sent_to }));
} catch (err) { toast(err.message, "err"); }