Skip to content

Commit

Permalink
add ntffy (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernes1 authored Sep 12, 2023
1 parent 9fc7ec7 commit d811f76
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/ntfy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import dotenv from 'dotenv';
dotenv.config();

let ntfyUrl = process.env.NTFY_URL;

export function sendNtfyOpen() {
let message = "Hackeriet is Open"
fetch(ntfyUrl,{
method: "POST",
headers: {
"Content-Type": "application/json",
},

body: message
},)
}

export function sendNtfyClosed() {
let message = "Hackeriet is Closed"
fetch( ntfyUrl,{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: message
},)
}

0 comments on commit d811f76

Please sign in to comment.