The DB.Update function takes a type of ACMETxt. However, the function
only requires the Value and Subdomain fields.
Refactor the function such that it takes ACMETxtPost instead of the full
ACMETxt record. This will simplify extraction of txt-record related
logic from the db code.
* Added http health check endpoint.
* Fixed performing POST on GET endpoint.
* Explicitly return http status 200 in health check endpoint.
* Updated changelog.
Previous to this commit, if the update message had a valid subdomain but
an invalid TXT the error returned was for a bad subdomain. This can
confuse developers who were POSTing junk TXT records to test acme-dns
:-)
This commit adjusts the `webUpdatePost` error handling such that
`!validSubdomain(input)` and `!validTXT(input)` give distinct errors.
The `!validSubdomain` case should never happen in `webUpdatePost`
because `auth.go`'s `Auth` function already vets the post data
subdomain but I retained the error handling code just in case.
Unit tests for an update with an invalid subdomain and an update with an
invalid TXT are included.