summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-02 01:30:17 -0700
committerSteve Manuel <nilslice@gmail.com>2016-11-02 01:30:17 -0700
commit0bc6673fd1747eef84124cf7137bfa32c9cb5e6d (patch)
tree8faf1c920c1a1a58fc570ebc02ab67e779d4039a
parent9a88eb23e74c8b853dc8cfbb40c02c9c701b52de (diff)
adding post unmarshal into cases based on status
-rw-r--r--system/admin/handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index f1e17e8..630796a 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -698,7 +698,7 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
<span class="active">Pending</span>
</div>`
- for i := len(posts); i >= 0; i-- {
+ for i := len(posts) - 1; i >= 0; i-- {
err := json.Unmarshal(posts[i], &p)
if err != nil {
log.Println("Error unmarshal json into", t, err, posts[i])