Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provider Porkbun: Don't attempt to update a record if it already matc…
…hes the expected ipStr Description: Porkbun will return a 400 error if you attempt to update the IP for a DNS record that is already set. This updates the API to return the full DNS record from Porkbun's API, and then to not attempt to update the record if it's already correct. Ultimately this may have been a fix for what ultimately was the root cause of the * domain being incorrect, but especially when people are setting up their DDNS Updater for the first time, this can help reduce unnecessary and unwanted errors in the interface. Alternatively, we could try to update and simply return a more helpful error message that likely the Porkbun DNS value is already correct. Test-Plan: Set `domain.tld` to 127.0.0.1 Started DDNS-Updater DDNS-Updater updated the domain successfully, at this time the domain has not propogated the new valid IP update Stop DDNS-Updater Deleted the updates.json file Re-launched DDNS-Updater DDNS-Updater gets into a bad state and 400's indefinitely until restarted after the valid domain has propogated Re-performed the above tests with the fixed code DDNS-Updater updates successfully Remove unnecessary newline Revert some changes to match PR comments and reduce delta
- Loading branch information