broke apprise notification function into its own module to be used by multiple scripts
Security / security (push) Successful in 58s
Security / security (push) Successful in 58s
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
[string] $ListenUrl = "http://+:8080/"
|
||||
|
||||
Import-Module ./AppriseNotification.psm1
|
||||
|
||||
function Write-JsonResponse
|
||||
{
|
||||
param(
|
||||
@@ -91,8 +93,7 @@ function Receive-Webhook
|
||||
Write-Host "Payload: <empty>"
|
||||
}
|
||||
|
||||
# Add your real webhook handling here.
|
||||
# Example: inspect $payload.event, save data, or call another API.
|
||||
Send-AppriseNotification -title "Donetick Webhook Received" -content ($payload | ConvertTo-Json -Depth 20)
|
||||
|
||||
Write-JsonResponse -Response $response -StatusCode 200 -Body @{
|
||||
ok = $true
|
||||
|
||||
Reference in New Issue
Block a user