mirror of
https://github.com/4ev-link/4ev.link.git
synced 2026-01-14 08:38:39 +00:00
Fix: ntfy signin emoji and await
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
const ntfy = (env,topic,tags,msg,p=3) =>
|
const ntfy = (env,topic,title,msg,p=3) =>
|
||||||
env.NTFY_TOPIC ?
|
env.NTFY_TOPIC ?
|
||||||
fetch(`https://ntfy.sh/${topic}`,{
|
fetch(`https://ntfy.sh/${topic}`,{
|
||||||
method:"POST",
|
method:"POST",
|
||||||
headers:{
|
headers:{
|
||||||
"Title":tags,
|
"Title":`🔐 ${title}`,
|
||||||
"Priority":String(p),
|
"Priority":String(p),
|
||||||
"Content-Type":"text/plain"
|
"Content-Type":"text/plain"
|
||||||
},
|
},
|
||||||
@@ -36,7 +36,7 @@ export async function onRequestPost({ request, env }) {
|
|||||||
if (user?.pass_hash !== pass_hash)
|
if (user?.pass_hash !== pass_hash)
|
||||||
return new Response("Invalid credentials",{ status:401 });
|
return new Response("Invalid credentials",{ status:401 });
|
||||||
|
|
||||||
ntfy(
|
await ntfy(
|
||||||
env,
|
env,
|
||||||
env.NTFY_TOPIC,
|
env.NTFY_TOPIC,
|
||||||
"auth-login",
|
"auth-login",
|
||||||
|
|||||||
Reference in New Issue
Block a user