Skip to content

feat: implement Presentation layer for DELETE /api/v1/users/{id} / ユーザー削除APIのPresentation層実装#523

Merged
zigzagdev merged 3 commits into
feat/user-deletefrom
feat/user-delete_presentation-layer
Jul 4, 2026
Merged

feat: implement Presentation layer for DELETE /api/v1/users/{id} / ユーザー削除APIのPresentation層実装#523
zigzagdev merged 3 commits into
feat/user-deletefrom
feat/user-delete_presentation-layer

Conversation

@zigzagdev

Copy link
Copy Markdown
Owner

Motivation / 目的

Implement the Controller and route for the User Delete API as part of #514.

ユーザー削除APIのPresentation層(#517)として、ControllerとRouteを実装しました。

What I have done / 実施内容

  • UserController::deleteUser(): route {id} を int にキャストして DeleteUserUseCase を呼び出す
    • 200 on success
    • 404 when 'User not found.' exception is thrown
    • 500 on other errors with Log::error
  • Route: DELETE /api/v1/users/{id}

Test Results / テスト結果

Integration tests hitting the real DB and HTTP endpoint:

  • test_delete_user_returns_200_when_user_exists
  • test_delete_user_returns_404_when_user_not_found

Closes #517

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.18519% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.30%. Comparing base (6f93265) to head (195533f).
⚠️ Report is 4 commits behind head on feat/user-delete.

Files with missing lines Patch % Lines
...pp/Packages/Features/Controller/UserController.php 57.89% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                  Coverage Diff                   @@
##             feat/user-delete     #523      +/-   ##
======================================================
+ Coverage               60.12%   60.30%   +0.17%     
- Complexity               1524     1534      +10     
======================================================
  Files                     122      123       +1     
  Lines                    7800     7854      +54     
======================================================
+ Hits                     4690     4736      +46     
- Misses                   3110     3118       +8     
Files with missing lines Coverage Δ
src/app/Packages/Features/Tests/DeleteUserTest.php 100.00% <100.00%> (ø)
...pp/Packages/Features/Controller/UserController.php 79.74% <57.89%> (-6.92%) ⬇️
🚀 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

This comment was marked as low quality.

@zigzagdev zigzagdev merged commit 8836cc7 into feat/user-delete Jul 4, 2026
27 checks passed
@zigzagdev zigzagdev deleted the feat/user-delete_presentation-layer branch July 4, 2026 11:19
@zigzagdev zigzagdev self-assigned this Jul 4, 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 Delete API / Presentation層のdeleteUser実装

1 participant