Moved away from local files to complete database driven articles

This commit is contained in:
2021-12-20 23:10:04 +01:00
parent bc3ec64b3c
commit c909339a73
20 changed files with 302 additions and 299 deletions

View File

@@ -1,17 +0,0 @@
package api
import (
"encoding/json"
"net/http"
)
type ApiError struct {
Message string `json:"message"`
OriginalError error
Code int
}
func (ae ApiError) Send(w http.ResponseWriter) error {
w.WriteHeader(ae.Code)
return json.NewEncoder(w).Encode(ae)
}