Move home payday event logic to controller and add joinedAt to calendar API#42
Merged
jeyongsong merged 2 commits intomainfrom Mar 21, 2026
Merged
Move home payday event logic to controller and add joinedAt to calendar API#42jeyongsong merged 2 commits intomainfrom
jeyongsong merged 2 commits intomainfrom
Conversation
…to fetch member join date
Test Results46 tests 46 ✅ 0s ⏱️ Results for commit cfbb5ef. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the home and calendar screen APIs by extending their response DTOs to include additional member/context data needed by clients (daily events on home, join date on calendar).
Changes:
- Add
events: List<DailyEventType>toHomeResponseand populate it from today’s schedule inHomeController. - Add
joinedAt: LocalDatetoCalendarResponseand populate it inCalendarControllerviaMemberService.getJoinedAt. - Introduce
MemberService.getJoinedAt(memberId)to expose a member’s join date derived fromcreatedAt.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/main/kotlin/com/moa/service/dto/HomeResponse.kt | Extends home API response with daily event list. |
| src/main/kotlin/com/moa/controller/screen/HomeController.kt | Populates events in the home response from the schedule. |
| src/main/kotlin/com/moa/service/dto/CalendarResponse.kt | Extends calendar API response with joinedAt. |
| src/main/kotlin/com/moa/controller/screen/CalendarController.kt | Fetches and returns joinedAt in calendar response. |
| src/main/kotlin/com/moa/service/MemberService.kt | Adds getJoinedAt service method to derive join date from createdAt. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request enhances the calendar and home screen APIs by providing additional information in their responses. The main improvements include adding the member's join date to the calendar response and including daily events in the home response. These changes require updates to both the controller and service layers, as well as modifications to the related DTOs.
Calendar API enhancements:
joinedAtfield (member's join date) to theCalendarResponsedata class, and updatedCalendarControllerto fetch this value using a newgetJoinedAtmethod inMemberService. (src/main/kotlin/com/moa/service/dto/CalendarResponse.kt,src/main/kotlin/com/moa/controller/screen/CalendarController.kt,src/main/kotlin/com/moa/service/MemberService.kt) [1] [2] [3] [4] [5] [6]Home API enhancements:
eventsfield (list ofDailyEventType) to theHomeResponsedata class and updated the controller to include this information in the response. (src/main/kotlin/com/moa/service/dto/HomeResponse.kt,src/main/kotlin/com/moa/controller/screen/HomeController.kt) [1] [2] [3]