mirror of
https://github.com/joohoi/acme-dns.git
synced 2025-07-04 07:17:24 +07:00
Actually call delete in /delete api (used update for testing)
This commit is contained in:
2
api.go
2
api.go
@ -127,7 +127,7 @@ func webDeletePost(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
|
||||
delStatus = http.StatusBadRequest
|
||||
del = jsonError("bad_txt")
|
||||
} else if validSubdomain(a.Subdomain) && validTXT(a.Value) {
|
||||
err := DB.Update(a.ACMETxtPost)
|
||||
err := DB.Delete(a.ACMETxtPost)
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{"error": err.Error()}).Debug("Error while trying to delete record")
|
||||
delStatus = http.StatusInternalServerError
|
||||
|
Reference in New Issue
Block a user