diff options
author | 2023-09-29 15:31:10 +0200 | |
---|---|---|
committer | 2023-09-29 15:31:10 +0200 | |
commit | 2b6b9cdf832078980ca668126bce3b4fcfff02a9 (patch) | |
tree | 77928699c5e40a20233ad2b795213cdb98a7d92e /internal/processing/timeline/public.go | |
parent | [frontend] Add `discoverable` flag to settings panel (#2235) (diff) | |
download | gotosocial-2b6b9cdf832078980ca668126bce3b4fcfff02a9.tar.xz |
[bugfix] Fix paging for empty items (#2236)
* use minID properly for public timeline
* return paged response properly even when 0 items
* use gtserror
* page more consistently (for now)
* test
* aaa
Diffstat (limited to 'internal/processing/timeline/public.go')
-rw-r--r-- | internal/processing/timeline/public.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/processing/timeline/public.go b/internal/processing/timeline/public.go index eb8c0c381..0ace00c0b 100644 --- a/internal/processing/timeline/public.go +++ b/internal/processing/timeline/public.go @@ -20,7 +20,6 @@ package timeline import ( "context" "errors" - "fmt" apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/db" @@ -33,7 +32,7 @@ import ( func (p *Processor) PublicTimelineGet(ctx context.Context, authed *oauth.Auth, maxID string, sinceID string, minID string, limit int, local bool) (*apimodel.PageableResponse, gtserror.WithCode) { statuses, err := p.state.DB.GetPublicTimeline(ctx, maxID, sinceID, minID, limit, local) if err != nil && !errors.Is(err, db.ErrNoEntries) { - err = fmt.Errorf("PublicTimelineGet: db error getting statuses: %w", err) + err = gtserror.Newf("db error getting statuses: %w", err) return nil, gtserror.NewErrorInternalError(err) } |