summaryrefslogtreecommitdiff
path: root/system/db/content.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-04-03 13:07:42 -0700
committerSteve Manuel <nilslice@gmail.com>2017-04-03 13:07:42 -0700
commitfaf4c67abcc5211e7b5ff45e908fa8a787bdaff2 (patch)
tree2838d2403f3bae3c31d57ae236f47340897c150a /system/db/content.go
parente7f4347a81acd1e757739838c3dcd9660f655a35 (diff)
move iterator to suffix of key to avoid clashing, include status in UI sort
Diffstat (limited to 'system/db/content.go')
-rw-r--r--system/db/content.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/db/content.go b/system/db/content.go
index 3e6e5a4..4de9342 100644
--- a/system/db/content.go
+++ b/system/db/content.go
@@ -570,9 +570,9 @@ func SortContent(namespace string) {
return err
}
- // encode to json and store as 'i:post.Time()':post
+ // encode to json and store as 'post.Time():i':post
for i := range bb {
- cid := fmt.Sprintf("%d", posts[i].Time())
+ cid := fmt.Sprintf("%d:%d", posts[i].Time(), i)
err = b.Put([]byte(cid), bb[i])
if err != nil {
return err