Skip to content

feat: implement Presentation layer for PATCH /api/v1/users/{id} / ユーザー更新APIのPresentation層実装#519

Merged
zigzagdev merged 3 commits into
feat/user_updatefrom
feat/user_update-presentation_layer
Jul 2, 2026
Merged

feat: implement Presentation layer for PATCH /api/v1/users/{id} / ユーザー更新APIのPresentation層実装#519
zigzagdev merged 3 commits into
feat/user_updatefrom
feat/user_update-presentation_layer

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

Motivation / 目的

Implement the Controller and route for the User Update API as part of #500.

ユーザー更新APIのPresentation層(#500)として、ControllerとRouteを実装しました。

What I have done / 実施内容

  • UserController::updateUser(): merge route {id} with request body, build UpdateUserCommand, call UpdateUserUseCase, return UserDto as JSON
    • 200 on success
    • 404 when 'User not found.' exception is thrown
    • 500 on other errors with Log::error
  • Route: PATCH /api/v1/users/{id}

Test Results / テスト結果

Integration tests hitting the real DB and HTTP endpoint:

  • test_update_user_returns_200_with_updated_data
  • test_update_user_returns_404_when_user_not_found
  • test_update_user_returns_500_when_required_key_is_missing

Closes #503

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.94%. Comparing base (3e4b21f) to head (0af8b3d).

Additional details and impacted files

Impacted file tree graph

@@                  Coverage Diff                   @@
##             feat/user_update     #519      +/-   ##
======================================================
+ Coverage               59.47%   59.94%   +0.46%     
- Complexity               1503     1515      +12     
======================================================
  Files                     119      120       +1     
  Lines                    7675     7765      +90     
======================================================
+ Hits                     4565     4655      +90     
  Misses                   3110     3110              
Files with missing lines Coverage Δ
...pp/Packages/Features/Controller/UserController.php 86.66% <100.00%> (+8.88%) ⬆️
src/app/Packages/Features/Tests/UpdateUserTest.php 100.00% <100.00%> (ø)
🚀 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 21a990a into feat/user_update Jul 2, 2026
27 checks passed
@zigzagdev zigzagdev deleted the feat/user_update-presentation_layer branch July 2, 2026 00:44
@zigzagdev zigzagdev assigned zigzagdev and unassigned zigzagdev Jul 2, 2026
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 User Update API / ユーザー更新APIのPresentation層実装

1 participant