summary refs log tree commit diff stats
path: root/svc/handlers.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-06 18:26:16 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-08 02:29:28 -0400
commit78f4d8a6c1f8c41543dd5c1522ec1100a52a1283 (patch)
treee5db1bcf37e647aa8caec5902b32c6f9ea9dbff1 /svc/handlers.go
parent3eb5a0321ea6e70a7ad3234efc9a0c1263833389 (diff)
downloadgetwtxt-78f4d8a6c1f8c41543dd5c1522ec1100a52a1283.tar.gz
sqlite functionality added
Diffstat (limited to 'svc/handlers.go')
-rw-r--r--svc/handlers.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/svc/handlers.go b/svc/handlers.go
index 13555d5..5bb0d4f 100644
--- a/svc/handlers.go
+++ b/svc/handlers.go
@@ -79,9 +79,6 @@ func apiAllTweetsHandler(w http.ResponseWriter, r *http.Request) {
 	}
 
 	data := parseQueryOut(out)
-	if err != nil {
-		data = []byte("")
-	}
 
 	etag := fmt.Sprintf("%x", sha256.Sum256(data))
 	w.Header().Set("ETag", etag)
@@ -140,11 +137,9 @@ func apiEndpointHandler(w http.ResponseWriter, r *http.Request) {
 		out, err = twtxtCache.QueryAllStatuses()
 		out = registry.ReduceToPage(page, out)
 	}
+	errLog("", err)
 
 	data := parseQueryOut(out)
-	if err != nil {
-		data = []byte("")
-	}
 
 	etag := fmt.Sprintf("%x", sha256.Sum256(data))
 	w.Header().Set("ETag", etag)