Added RSS and JSON feeds

This commit is contained in:
Leon Mika 2026-03-05 22:04:24 +11:00
parent 65e5ce2733
commit 21f181f83d
13 changed files with 192 additions and 31 deletions

View file

@ -4,6 +4,7 @@ import (
"context"
"lmika.dev/lmika/weiro/models"
"lmika.dev/lmika/weiro/providers/db"
)
func (s *Service) ListPosts(ctx context.Context, showDeleted bool) ([]*models.Post, error) {
@ -12,7 +13,10 @@ func (s *Service) ListPosts(ctx context.Context, showDeleted bool) ([]*models.Po
return nil, models.SiteRequiredError
}
posts, err := s.db.SelectPostsOfSite(ctx, site.ID, showDeleted)
posts, err := s.db.SelectPostsOfSite(ctx, site.ID, showDeleted, db.PagingParams{
Offset: 0,
Limit: 25,
})
if err != nil {
return nil, err
}