mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-07-31 09:38:40 -04:00
[PR #514] [MERGED] Group records in database by ipVersion
#719
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/qdm12/ddns-updater/pull/514
Author: @felixwrt
Created: 8/4/2023
Status: ✅ Merged
Merged: 1/15/2024
Merged by: @qdm12
Base:
master← Head:ipFilter2📝 Commits (1)
1e8f876fix(internal/persistence/json): get events by IP version📊 Changes
2 files changed (+32 additions, -6 deletions)
View changed files
📝
cmd/updater/main.go(+4 -2)📝
internal/persistence/json/queries.go(+28 -4)📄 Description
Currently, items in the database (
updates.json) are grouped bydomainandhost. This leads to problems when there are multiple config items that contain the same domain and host.I'm using two separate config items with the same host and domain but different
ipVersionvalues to update both the ipv4 and ipv6 address. In this setup,ddns-updatercurrently uses the history of both ip versions which leads to incorrect info displayed in the UI.This PR adds
ipVersionas an additional item that is used to group IPs in the database. With this change, the history is displayed correctly.Example
config.json:updates.jsonusing current master:updates.jsonwith the changes proposed in this PR:UI (current master):

UI (with the changes proposed here):

Let me know if this looks good to you. Thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.