From e32430e1cee993267b5ef41797d589661564f6ba Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Mon, 10 Nov 2025 13:34:20 -0800 Subject: [PATCH] Fix: ntfy signin emoji and await --- functions/api/signin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/api/signin.js b/functions/api/signin.js index 3417734..76de533 100644 --- a/functions/api/signin.js +++ b/functions/api/signin.js @@ -1,9 +1,9 @@ -const ntfy = (env,topic,tags,msg,p=3) => +const ntfy = (env,topic,title,msg,p=3) => env.NTFY_TOPIC ? fetch(`https://ntfy.sh/${topic}`,{ method:"POST", headers:{ - "Title":tags, + "Title":`🔐 ${title}`, "Priority":String(p), "Content-Type":"text/plain" }, @@ -36,7 +36,7 @@ export async function onRequestPost({ request, env }) { if (user?.pass_hash !== pass_hash) return new Response("Invalid credentials",{ status:401 }); - ntfy( + await ntfy( env, env.NTFY_TOPIC, "auth-login",