diff options
-rw-r--r-- | post.go | 6 | ||||
-rw-r--r-- | query.go | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/post.go b/post.go index 4078cf6..103c254 100644 --- a/post.go +++ b/post.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "log" "net/http" "github.com/getwtxt/registry" @@ -58,5 +59,8 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) { } log200(r) - _, _ = w.Write([]byte(fmt.Sprintf("200 OK\n"))) + _, err = w.Write([]byte(fmt.Sprintf("200 OK\n"))) + if err != nil { + log.Printf("%v\n", err) + } } diff --git a/query.go b/query.go index ac46223..63e203c 100644 --- a/query.go +++ b/query.go @@ -109,9 +109,6 @@ func apiEndpointQuery(w http.ResponseWriter, r *http.Request) error { w.Header().Set("Content-Type", txtutf8) _, err = w.Write(data) - if err != nil { - return err - } - return nil + return err } |