summary refs log tree commit diff stats
path: root/svc/post.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-06 18:16:29 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-08 02:29:23 -0400
commit6c1b09bbeb1a7268a0d590e0a20ab2d34b395c8f (patch)
tree2c843adf344830510ff517f344b3af451955f98c /svc/post.go
parent5fa9ec1b63acc6ac9dc0a8b5d2f8f044c27ea45e (diff)
downloadgetwtxt-6c1b09bbeb1a7268a0d590e0a20ab2d34b395c8f.tar.gz
cleaned up error handling
Diffstat (limited to 'svc/post.go')
-rw-r--r--svc/post.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/svc/post.go b/svc/post.go
index 0355afa..85804dc 100644
--- a/svc/post.go
+++ b/svc/post.go
@@ -2,7 +2,6 @@ package svc // import "github.com/getwtxt/getwtxt/svc"
 
 import (
 	"fmt"
-	"log"
 	"net/http"
 
 	"github.com/getwtxt/registry"
@@ -48,9 +47,7 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) {
 	}
 
 	statuses, err := registry.ParseUserTwtxt(out, nick, urls)
-	if err != nil {
-		log.Printf("Error Parsing User Data: %v\n", err.Error())
-	}
+	errLog("Error Parsing User Data: ", err)
 
 	if err := twtxtCache.AddUser(nick, urls, "", uip, statuses); err != nil {
 		log400(w, r, "Error Adding User to Cache: "+err.Error())
@@ -59,7 +56,5 @@ func apiPostUser(w http.ResponseWriter, r *http.Request) {
 
 	log200(r)
 	_, err = w.Write([]byte(fmt.Sprintf("200 OK\n")))
-	if err != nil {
-		log.Printf("%v\n", err.Error())
-	}
+	errLog("", err)
 }