From 6d2165caf72b699a6f32c471cffad4156902419a Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Mon, 15 Dec 2025 19:23:22 -0800 Subject: [PATCH] Refactor: Use NTFY_URL env var instead of constructing from NTFY_TOPIC --- functions/api/unsubscribe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/api/unsubscribe.js b/functions/api/unsubscribe.js index e66b63f..c168af0 100644 --- a/functions/api/unsubscribe.js +++ b/functions/api/unsubscribe.js @@ -17,7 +17,7 @@ export async function onRequestPost({ request, env }) { return new Response(`{"error":"Resend error: ${text}"}`, { status: 500, headers: { 'Content-Type': 'application/json' } }); } - await fetch(`https://ntfy.sh/${env.NTFY_TOPIC}`, { + await fetch(env.NTFY_URL, { method: 'POST', headers: { Priority: '3', Title: `🔕 Unsubscribe` }, body: email