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
@@ -8,8 +8,8 @@ Feature: Public and authenticated article listing
Background:
Given internal/domain/article.Article has a json "is_online" field
And ListArticlesUseCase.ListOnlineArticles filters article.Filters{IsOnline: true} and
ListArticlesUseCase.ListAllArticles applies no filter, both already implemented
And ListArticlesUseCase.ListArticlesPage filters article.Filters{IsOnline: true} for an unverified
caller and applies no visibility filter for a verified one
And before this slice, GET /v1/article/ sits inside the jwtauth Verifier + Authenticator group
in api/router.go along with GET /v1/article/{id}, POST /v1/article/ and DELETE /v1/article/{id},
so an anonymous request to any of them answers 401, not an online-only list
@@ -19,7 +19,7 @@ Feature: Public and authenticated article listing
And a later slice, features/public_article_read.feature, moves GET /v1/article/{id} into the
same Verifier-only group as GET /v1/article/, so the 401 Examples table below is updated
accordingly
And Handler.ListArticles decides between ListAllArticles and ListOnlineArticles by checking the
And Handler.ListArticles decides between a verified and an unverified ListArticlesPage call by checking the
request for a valid jwt, read with jwtauth.FromContext from the token the router-level
jwtauth.Verifier (header and cookie sources) placed in the request context, rather than
requiring the router-level Authenticator middleware; article.NewHandler takes no token