[Feat/update signup response] - 회원가입에 환영알(Egg) 정보 추가#95
Conversation
WalkthroughThe changes introduce a new feature that grants a "greeting egg" to users upon registration. This involves updating the user signup service and response DTO to include egg information, modifying the egg grant service to return the granted egg, and updating related tests and fixtures to support and verify the new behavior. Unnecessary dependencies on egg granting are removed from unrelated services. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant SignUpUsecaseImpl
participant UserRegisterService
participant EggGrantService
participant TokenService
Client->>SignUpUsecaseImpl: register(signUpCommand)
SignUpUsecaseImpl->>UserRegisterService: registerUser(command)
UserRegisterService-->>SignUpUsecaseImpl: savedUser
SignUpUsecaseImpl->>EggGrantService: grantGreetingEggToUser(savedUser)
EggGrantService-->>SignUpUsecaseImpl: greetingEgg
SignUpUsecaseImpl->>TokenService: createTokenPair(savedUser)
TokenService-->>SignUpUsecaseImpl: tokenPair
SignUpUsecaseImpl-->>Client: SignupUserResponse(user, tokenPair, greetingEgg)
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. 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
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds welcome egg information to the signup response and moves the egg granting logic from the UserRegisterService to the usecase layer.
- Removed egg-related logic from UserRegisterService and corresponding tests.
- Updated SignupUserResponse to include egg information.
- Added EggFixtures and tests for verifying the greeting egg award.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/org/runimo/runimo/user/service/usecases/UserRegisterServiceTest.java | Removed eggGrantService usage from unit tests as the logic was moved to the usecase layer. |
| src/test/java/org/runimo/runimo/user/api/UserItemAcceptanceTest.java | Updated test construction to include egg parameters. |
| src/test/java/org/runimo/runimo/user/UserFixtures.java | Updated user fixture constants; potential inconsistency in imgUrl value for getUserWithId. |
| src/test/java/org/runimo/runimo/item/EggFixtures.java | New fixture file for egg test data. |
| src/test/java/org/runimo/runimo/auth/service/SignUpUsecaseTest.java | Added test for awarding greeting egg on signup. |
| src/main/java/org/runimo/runimo/user/service/UserRegisterService.java | Removed outdated egg granting call. |
| src/main/java/org/runimo/runimo/rewards/service/eggs/EggGrantService.java | Changed the method signature to return the granted egg. |
| src/main/java/org/runimo/runimo/auth/service/dto/SignupUserResponse.java | Updated response DTO to include greeting egg fields. |
| src/main/java/org/runimo/runimo/auth/service/SignUpUsecaseImpl.java | Updated usecase to obtain and return the greeting egg in the signup response. |
작업내역
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Refactor