mirror of
https://github.com/4ev-link/4ev.link.git
synced 2026-01-14 00:28:05 +00:00
Refactor: Replace NTFY_TOPIC with NTFY_URL for flexible notifications
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
const ntfy = (env,title,msg,slug,user,p=2) => {
|
const ntfy = (env,title,msg,slug,user,p=2) => {
|
||||||
if(!env.NTFY_TOPIC) return Promise.resolve();
|
if(!env.NTFY_URL) return Promise.resolve();
|
||||||
const origin = "https://4ev.link";
|
const origin = "https://4ev.link";
|
||||||
const actions = `view, Seize, ${origin}/admin?slug=${slug}; view, Ban User, ${origin}/admin?user=${user}`;
|
const actions = `view, Seize, ${origin}/admin?slug=${slug}; view, Ban User, ${origin}/admin?user=${user}`;
|
||||||
return fetch(`https://ntfy.sh/${env.NTFY_TOPIC}`,{
|
return fetch(env.NTFY_URL,{
|
||||||
method:"POST",
|
method:"POST",
|
||||||
headers:{
|
headers:{
|
||||||
"Title":`✏️ ${title}`,
|
"Title":`✏️ ${title}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user