-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use DELETE method for removing UserProfilePicture instead of PATСH #446
Use DELETE method for removing UserProfilePicture instead of PATСH #446
Conversation
WalkthroughThe pull request modifies the Changes
Possibly related PRs
Suggested Reviewers
Poem
Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
core/src/main/java/greencity/controller/UserController.java (1)
344-347
: Good change to use DELETE for profile picture removal!The change from PATCH to DELETE better aligns with REST principles since we're removing a resource. However, consider making the endpoint path more RESTful.
Consider renaming the endpoint to follow REST conventions:
-@DeleteMapping(path = "/deleteProfilePicture") +@DeleteMapping(path = "/profile-picture")This makes the endpoint more resource-focused rather than action-focused, which is a REST best practice.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
core/src/main/java/greencity/controller/UserController.java
(2 hunks)core/src/test/java/greencity/controller/UserControllerTest.java
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (1)
core/src/test/java/greencity/controller/UserControllerTest.java (1)
Line range hint
327-332
: Test correctly updated to match the new DELETE endpoint!The test has been properly updated to use the DELETE method and verifies both the service call and response status.
Quality Gate passedIssues Measures |
😎 GreenCity User 😎
Issue Link:
8019
Changes:
Replace PATH with DELETE mapping
Fix the related test
Previous Condition:
Current Condition:
Summary by CodeRabbit
New Features
Bug Fixes