Actually call delete in /delete api (used update for testing)

This commit is contained in:
Jacob Myers 2020-09-29 10:18:52 -04:00
parent b08f0831a0
commit e328865cd0

2
api.go
View File

@ -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