diff options
-rw-r--r-- | system/db/content.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/system/db/content.go b/system/db/content.go index d9b5460..2626e8b 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -211,10 +211,11 @@ func SortContent(namespace string) { fmt.Println(all) var posts sortablePosts - post := content.Types[namespace]() // decode each (json) into Editable for i := range all { j := all[i] + post := content.Types[namespace]() + err := json.Unmarshal(j, &post) if err != nil { log.Println("Error decoding json while sorting", namespace, ":", err) |