Skip to content

feat: implement Presentation layer for GET /api/v1/favorites / お気に入り一覧のPresentation層実装 - #571

Merged
zigzagdev merged 3 commits into
feat/user-favoritefrom
feat/user-favorite-index-list-presentation
Aug 8, 2026
Merged

feat: implement Presentation layer for GET /api/v1/favorites / お気に入り一覧のPresentation層実装#571
zigzagdev merged 3 commits into
feat/user-favoritefrom
feat/user-favorite-index-list-presentation

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

Motivation / 目的

Expose the favorite heritages list built in the Application layer (GetFavoriteHeritagesUseCase) through a REST endpoint so the frontend can fetch the authenticated user's favorites.

What I have done / 実施内容

  • Added GET /api/v1/favorites route
  • Added FavoriteController::getFavorites, returning WorldHeritageDtoCollection::toSummaryArray() (matching the list-response convention already used by the heritages endpoints)

Test Results / テスト結果

  • test_getFavorites_returns_200_with_favorite_heritages_when_authenticated
  • test_getFavorites_returns_200_with_empty_array_when_user_has_no_favorites
  • test_getFavorites_returns_401_when_unauthenticated
  • test_getFavorites_returns_500_on_unexpected_error

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.28%. Comparing base (74a2857) to head (0c4e887).
⚠️ Report is 1 commits behind head on feat/user-favorite.

Files with missing lines Patch % Lines
...Packages/Features/Tests/FavoriteControllerTest.php 97.72% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                    @@
##             feat/user-favorite     #571      +/-   ##
========================================================
+ Coverage                 64.05%   64.28%   +0.23%     
- Complexity                 1671     1677       +6     
========================================================
  Files                       145      145              
  Lines                      8694     8753      +59     
========================================================
+ Hits                       5569     5627      +58     
- Misses                     3125     3126       +1     
Files with missing lines Coverage Δ
...ackages/Features/Controller/FavoriteController.php 88.88% <100.00%> (+7.93%) ⬆️
...Packages/Features/Tests/FavoriteControllerTest.php 99.07% <97.72%> (-0.93%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zigzagdev zigzagdev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@zigzagdev
zigzagdev merged commit 298153d into feat/user-favorite Aug 8, 2026
27 checks passed
@zigzagdev
zigzagdev deleted the feat/user-favorite-index-list-presentation branch August 8, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: implement Presentation layer for favorite heritages list API / お気に入り一覧APIのPresentation層実装

1 participant