diff options
-rw-r--r-- | system/db/content.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/db/content.go b/system/db/content.go index f313543..ef74091 100644 --- a/system/db/content.go +++ b/system/db/content.go @@ -334,7 +334,7 @@ func SortContent(namespace string) { all := ContentAll(namespace) - var posts sortablePosts + var posts sortableContent // decode each (json) into type to then sort for i := range all { j := all[i] @@ -387,17 +387,17 @@ func SortContent(namespace string) { } -type sortableContents []editor.Sortable +type sortableContent []editor.Sortable -func (s sortableContents) Len() int { +func (s sortableContent) Len() int { return len(s) } -func (s sortableContents) Less(i, j int) bool { +func (s sortableContent) Less(i, j int) bool { return s[i].Time() > s[j].Time() } -func (s sortableContents) Swap(i, j int) { +func (s sortableContent) Swap(i, j int) { s[i], s[j] = s[j], s[i] } |