-
Notifications
You must be signed in to change notification settings - Fork 0
refactor - api 서비스 폴더 리팩토링 #79
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
Conversation
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.
Pull request overview
This PR refactors the API service layer by renaming MemberService to UserService and consolidating related model classes. The refactoring improves code organization by separating user-related endpoints from matching-related endpoints.
Key changes:
- Renamed
MemberServicetoUserServiceandgetMemberInfo()togetUserInfo() - Moved
getMyAiSummary()fromMatchingServicetoUserServicefor better API organization - Consolidated model files: merged
AiSummaryResponseand deletedMyStatusResponseintoUserResponse.kt, mergedMalePendingMatchingResponseintoMatching.kt
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| StatusAdvanceEffect.kt | Updated to call getUserInfo() instead of getMemberInfo() |
| HomeViewModel.kt | Added UserService dependency and updated AI summary call to use userService |
| LoginScreenViewModel.kt | Updated to call getUserInfo() instead of getMemberInfo() |
| RouterScreen.kt | Updated to call getUserInfo() instead of getMemberInfo() |
| UserResponse.kt | Renamed from MemberInfoResponse to UserInfoResponse and consolidated AiSummaryResponse |
| MyStatusResponse.kt | Deleted - functionality merged elsewhere |
| Matching.kt | Consolidated MalePendingMatchingResponse from separate file |
| MalePendingMatchingResponse.kt | Deleted - moved to Matching.kt |
| Error.kt | Removed extra blank line |
| AiSummaryResponse.kt | Deleted - moved to UserResponse.kt |
| DataStoreManager.kt | Updated import to use UserInfoResponse |
| UserService.kt | New service interface extracted from MemberService with user-related endpoints |
| ServiceFactory.kt | Updated to create UserService instance (property still named memberService) |
| MemberService.kt | Deleted - replaced by UserService |
| MatchingService.kt | Removed getMyAiSummary() method and organized endpoints with comments |
| LoginCallbackActivity.kt | Updated to call getUserInfo() instead of getMemberInfo() |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| val memberService: MemberService by lazy { | ||
| ApiClient.retrofit.create(MemberService::class.java) | ||
| val memberService: UserService by lazy { |
Copilot
AI
Jan 8, 2026
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.
The property is named memberService but its type is UserService. This creates a naming inconsistency. Consider renaming the property to userService to match the type and better reflect the refactored structure.
| val memberService: UserService by lazy { | |
| val userService: UserService by lazy { |
| class HomeViewModel( | ||
| private val matchingService: MatchingService = ServiceFactory.matchingService | ||
| private val matchingService: MatchingService = ServiceFactory.matchingService, | ||
| private val userService: UserService = ServiceFactory.memberService |
Copilot
AI
Jan 8, 2026
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.
The parameter is named userService but is initialized from ServiceFactory.memberService. While this works, it creates confusion because the factory property name doesn't match the service type. This inconsistency should be resolved by updating ServiceFactory.memberService to ServiceFactory.userService.
| private val userService: UserService = ServiceFactory.memberService | |
| private val userService: UserService = ServiceFactory.userService |
작업내용