Skip to content

Move home payday event logic to controller and add joinedAt to calendar API#42

Merged
jeyongsong merged 2 commits intomainfrom
client-required
Mar 21, 2026
Merged

Move home payday event logic to controller and add joinedAt to calendar API#42
jeyongsong merged 2 commits intomainfrom
client-required

Conversation

@jeyongsong
Copy link
Copy Markdown
Member

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:

  • Added a joinedAt field (member's join date) to the CalendarResponse data class, and updated CalendarController to fetch this value using a new getJoinedAt method in MemberService. (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:

  • Added an events field (list of DailyEventType) to the HomeResponse data 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]

Copilot AI review requested due to automatic review settings March 21, 2026 08:38
@github-actions
Copy link
Copy Markdown

Test Results

46 tests   46 ✅  0s ⏱️
 6 suites   0 💤
 6 files     0 ❌

Results for commit cfbb5ef.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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> to HomeResponse and populate it from today’s schedule in HomeController.
  • Add joinedAt: LocalDate to CalendarResponse and populate it in CalendarController via MemberService.getJoinedAt.
  • Introduce MemberService.getJoinedAt(memberId) to expose a member’s join date derived from createdAt.

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.

@jeyongsong jeyongsong merged commit ccb87e8 into main Mar 21, 2026
7 checks passed
@jeyongsong jeyongsong deleted the client-required branch March 21, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants