feat: implement Presentation layer for DELETE /api/v1/users/{id} / ユーザー削除APIのPresentation層実装#523
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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を呼び出す'User not found.'exception is thrownLog::errorDELETE /api/v1/users/{id}Test Results / テスト結果
Integration tests hitting the real DB and HTTP endpoint:
test_delete_user_returns_200_when_user_existstest_delete_user_returns_404_when_user_not_foundCloses #517