feat: articles pagination

This commit is contained in:
Florian Sylvain committed 2026-10-11 19:14:37 +02:00
1 parent a2d224240c
commit 73f4b539fe
45 files changed
+3528 -317

No files matched your search

+3 -3
View File
@@ -131,7 +131,7 @@ func TestVerifiedAccountRequiredHttp(t *testing.T) {
t.Fatalf("expected status 201, got %d, body %q", rec.Code, rec.Body.String())
}
var got domainArticle.Article
if err := json.Unmarshal(rec.Body.Bytes(), &got); err != nil {
if err := json.Unmarshal(articleItemsJSON(rec.Body.Bytes()), &got); err != nil {
t.Fatalf("failed to decode response: %v", err)
}
if got.Title != "Valid Title" || got.Body != "Some content" {
@@ -248,7 +248,7 @@ func TestVerifiedAccountRequiredHttp(t *testing.T) {
t.Fatalf("expected status 200, got %d, body %q", rec.Code, rec.Body.String())
}
var got []domainArticle.Article
if err := json.Unmarshal(rec.Body.Bytes(), &got); err != nil {
if err := json.Unmarshal(articleItemsJSON(rec.Body.Bytes()), &got); err != nil {
t.Fatalf("failed to decode response: %v", err)
}
if len(got) != 1 || got[0].ID != 1 {
@@ -283,7 +283,7 @@ func TestVerifiedAccountRequiredHttp(t *testing.T) {
t.Fatalf("expected status 200, got %d, body %q", rec.Code, rec.Body.String())
}
var got []domainArticle.Article
if err := json.Unmarshal(rec.Body.Bytes(), &got); err != nil {
if err := json.Unmarshal(articleItemsJSON(rec.Body.Bytes()), &got); err != nil {
t.Fatalf("failed to decode response: %v", err)
}
ids := map[uint32]bool{}