Added ability to set/add Webhook Token in payload

This commit is contained in:
2024-02-12 16:50:56 +13:00
parent 13e2fa6f7b
commit ddd6326a6e
5 changed files with 27 additions and 26 deletions

11
main.go
View File

@@ -92,11 +92,12 @@ func main() {
}
if err := notifiers.NotifyWithLog(ctx, notifications.Notification{
OldIp: net.ParseIP(dnsRecord.Content),
NewIp: currentPublicIP,
CheckedAt: time.Now(),
ResolverTag: resolverTag,
Domain: dnsRecord.Name,
OldIp: net.ParseIP(dnsRecord.Content),
NewIp: currentPublicIP,
CheckedAt: time.Now(),
ResolverTag: resolverTag,
Domain: dnsRecord.Name,
WebhookToken: config.WebhookToken,
}); err != nil {
log.Printf("errors in notifications: %s", err)
}