summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-11-16 02:28:51 -0800
committerSteve Manuel <nilslice@gmail.com>2016-11-16 02:28:51 -0800
commit27f65ee344f094adeac73d33b524d6b805ab8910 (patch)
tree420036ca317adb48e48e31890668d1b88289c7cd /system
parentcffc8906b5cff73d25aef71e83a79e361ecad917 (diff)
adding non-Externalable content listing
Diffstat (limited to 'system')
-rw-r--r--system/admin/handlers.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 7b1a09c..38ce41d 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -893,7 +893,22 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
}
}
+ } else {
+ for i := range posts {
+ err := json.Unmarshal(posts[i], &p)
+ if err != nil {
+ log.Println("Error unmarshal json into", t, err, posts[i])
+
+ post := `<li class="col s12">Error decoding data. Possible file corruption.</li>`
+ b.Write([]byte(post))
+ continue
+ }
+
+ post := adminPostListItem(p, t, status)
+ b.Write(post)
+ }
}
+
html += `<ul class="posts row">`
b.Write([]byte(`</ul></div></div>`))