Add initial project structure with database setup, logging, and workflow management
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import axios from "axios";
|
||||
export default function ntfy(ctx) {
|
||||
log.info({ ctx }, "ntfy");
|
||||
const headers = {}
|
||||
|
||||
if(ctx.data?.title) {
|
||||
headers.Title = ctx.data.title
|
||||
}
|
||||
|
||||
axios.post(ctx.config?.url || "https://ntfy.sh/scrunner", ctx.data?.message || "Hello from scrunner", {
|
||||
headers: headers
|
||||
})
|
||||
return {sent: "true"}
|
||||
}
|
||||
Reference in New Issue
Block a user