summaryrefslogtreecommitdiff
path: root/system/api/handlers.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-26 01:53:15 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-26 01:53:15 -0700
commite8945192276de251022bd4732178cd0143f41f78 (patch)
tree6939ba8a10b42eecf6e8a0cc6ba09f311b2fcdb4 /system/api/handlers.go
parent3dbc41fbbe547092604b51c6f26261dce05eab26 (diff)
code reorganizing
Diffstat (limited to 'system/api/handlers.go')
-rw-r--r--system/api/handlers.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/system/api/handlers.go b/system/api/handlers.go
index 2ec82bb..a56a667 100644
--- a/system/api/handlers.go
+++ b/system/api/handlers.go
@@ -3,7 +3,6 @@ package api
import (
"bytes"
"encoding/json"
- "fmt"
"log"
"net/http"
"strconv"
@@ -69,8 +68,6 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
all = append(all, post)
}
- fmt.Println(len(posts))
-
var start, end int
switch count {
case -1:
@@ -203,6 +200,7 @@ func SendJSON(res http.ResponseWriter, j map[string]interface{}) {
data, err = json.Marshal(j)
if err != nil {
+ log.Println(err)
data, _ = json.Marshal(map[string]interface{}{
"status": "fail",
"message": err.Error(),