diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2022-05-20 17:31:44 -0600 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2022-05-20 17:31:44 -0600 |
commit | 47d478790742a8876af187b34b766b0e8a772bf5 (patch) | |
tree | e51f5afcd138a1c7cca5ca3b403f02d01b81a318 /srv/src/http/posts.go | |
parent | 99f8c1188ccd1580f58ad4c21cece040ed8e874c (diff) |
Always return results in time desc order from PostStore
Diffstat (limited to 'srv/src/http/posts.go')
-rw-r--r-- | srv/src/http/posts.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/srv/src/http/posts.go b/srv/src/http/posts.go index 816e361..e1ddf80 100644 --- a/srv/src/http/posts.go +++ b/srv/src/http/posts.go @@ -69,11 +69,11 @@ func (a *api) postToPostTplPayload(storedPost post.StoredPost) (postTplPayload, } if !foundThis { - tplPayload.SeriesPrevious = &seriesPost + tplPayload.SeriesNext = &seriesPost continue } - tplPayload.SeriesNext = &seriesPost + tplPayload.SeriesPrevious = &seriesPost break } } @@ -138,7 +138,7 @@ func (a *api) renderPostsIndexHandler() http.Handler { return } - posts, hasMore, err := a.params.PostStore.WithOrderDesc().Get(page, pageCount) + posts, hasMore, err := a.params.PostStore.Get(page, pageCount) if err != nil { apiutil.InternalServerError( rw, r, fmt.Errorf("fetching page %d of posts: %w", page, err), |