dev to main - v0.1.2 #4

Merged
chiko merged 7 commits from dev into main 2025-10-26 14:22:06 +00:00
Showing only changes of commit c1ad9c7494 - Show all commits

View File

@@ -6,7 +6,8 @@ export async function sendNotification(title: string, body: string, link?: strin
link link
} }
}); });
const response = await fetch("http://apprise:8000/notify", { if ( ! ( process.env.notification_mock == "true" ) ) {
const response = await fetch(`${ process.env.apprise_https == "true" ? "https" : "http"}://${process.env.apprise_host ? process.env.apprise_host : "apprise"}:${process.env.apprise_port ? String(process.env.apprise_port) : "80" }/notify"`, {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json" "Content-Type": "application/json"
@@ -23,4 +24,10 @@ export async function sendNotification(title: string, body: string, link?: strin
}); });
const responseBody = await response.json(); const responseBody = await response.json();
return responseBody; return responseBody;
} else {
console.dir({
sendNotification: "mocking"
})
}
} }