[acme db interface] wip

This commit is contained in:
max furman 2021-03-03 15:16:25 -08:00
parent 03ba229bcb
commit 1135ae04fc
12 changed files with 251 additions and 222 deletions

View file

@ -14,10 +14,9 @@ import (
// WriteError writes to w a JSON representation of the given error.
func WriteError(w http.ResponseWriter, err error) {
switch k := err.(type) {
switch err.(type) {
case *acme.Error:
w.Header().Set("Content-Type", "application/problem+json")
err = k.ToACME()
default:
w.Header().Set("Content-Type", "application/json")
}