Skip to content

Commit

Permalink
fix notify message
Browse files Browse the repository at this point in the history
  • Loading branch information
orvice committed Oct 24, 2024
1 parent 1d9543c commit 40a486a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 135 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/snyk-container.yml

This file was deleted.

79 changes: 0 additions & 79 deletions .github/workflows/snyk-security.yml

This file was deleted.

3 changes: 2 additions & 1 deletion cmd/ddns/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func updateIP(ctx context.Context) error {
logger.Info("ip is same, skip update", "ip", ip)
return nil
}
oldIP := record.Value
record.Value = ip
_, err = dnsProvider.SetRecords(ctx, zone, []libdns.Record{
*record,
Expand All @@ -115,7 +116,7 @@ func updateIP(ctx context.Context) error {
logger.Error("Set records error", "error", err)
return err
}
notify.Notify(ctx, fmt.Sprintf(IPNotifyFormat, config.DOMAIN, record.Value, ip))
notify.Notify(ctx, fmt.Sprintf(IPNotifyFormat, config.DOMAIN, oldIP, ip))
} else {
_, err = dnsProvider.AppendRecords(ctx, zone, []libdns.Record{
{
Expand Down

0 comments on commit 40a486a

Please sign in to comment.