Send-test uses form auth values directly (no save required)
build-and-push / docker (push) Has been cancelled
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:
+5
-1
@@ -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"); }
|
||||
|
||||
Reference in New Issue
Block a user