diff --git a/pkg/internal/server/api/feed_api.go b/pkg/internal/server/api/feed_api.go index 1ea887a..dc3121c 100644 --- a/pkg/internal/server/api/feed_api.go +++ b/pkg/internal/server/api/feed_api.go @@ -100,20 +100,8 @@ func listFeed(c *fiber.Ctx) error { return feed[i].CreatedAt.After(feed[j].CreatedAt) }) - start := offset - end := start + take - if start > len(feed) { - return c.JSON(fiber.Map{ - "count": postCount + articleCount, - "data": []FeedRecord{}, - }) - } - if end > len(feed) { - end = len(feed) - } - return c.JSON(fiber.Map{ "count": postCount + articleCount, - "data": feed[start:end], + "data": feed, }) }