diff options
Diffstat (limited to 'srv/src/http')
-rw-r--r-- | srv/src/http/feed.go | 2 | ||||
-rw-r--r-- | srv/src/http/index.go | 2 | ||||
-rw-r--r-- | srv/src/http/posts.go | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/srv/src/http/feed.go b/srv/src/http/feed.go index 8c0ef1c..ba8b2e6 100644 --- a/srv/src/http/feed.go +++ b/srv/src/http/feed.go @@ -26,7 +26,7 @@ func (a *api) renderFeedHandler() http.Handler { Author: author, } - recentPosts, _, err := a.params.PostStore.WithOrderDesc().Get(0, 20) + recentPosts, _, err := a.params.PostStore.Get(0, 20) if err != nil { apiutil.InternalServerError(rw, r, fmt.Errorf("fetching recent posts: %w", err)) return diff --git a/srv/src/http/index.go b/srv/src/http/index.go index bb76568..4557f95 100644 --- a/srv/src/http/index.go +++ b/srv/src/http/index.go @@ -30,7 +30,7 @@ func (a *api) renderIndexHandler() 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), 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), |