2 Commits

Author SHA1 Message Date
7b594614c6 Merge branch 'version/0.1.3' into dev 2025-10-27 17:59:23 +01:00
608608aa56 Bugfix in sendNotification()
URL for Post Request returned a 404 because there was a " too much
2025-10-27 17:54:30 +01:00
3 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
services: services:
app: app:
image: chiko/77th_eventcalendarntfy:v0.1.2 image: chiko/77th_eventcalendarntfy:v0.1.3
build: . build: .
volumes: volumes:
- ./data/db:/opt/app/data/db - ./data/db:/opt/app/data/db

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.1.2", "version": "0.1.3",
"name": "77th_eventcalendernotification", "name": "77th_eventcalendernotification",
"module": "./src/app.ts", "module": "./src/app.ts",
"type": "module", "type": "module",

View File

@@ -7,7 +7,7 @@ export async function sendNotification(title: string, body: string, link?: strin
} }
}); });
if ( ! ( process.env.notification_mock == "true" ) ) { 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"`, { 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"