Skip to content

Commit

Permalink
feat: add my family info query api
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jul 22, 2024
1 parent 7241461 commit 7c3c037
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gateway/src/main/java/com/oing/controller/MeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ public MemberResponse getMe(String loginMemberId) {
return MemberResponse.of(member);
}

@Override
public FamilyResponse getMyFamily(String loginMemberId) {
Member member = memberService.getMemberByMemberId(loginMemberId);
Family family = familyService.getFamilyById(member.getFamilyId());
return FamilyResponse.of(family);
}

@Override
public DefaultResponse registerFcmToken(
AddFcmTokenRequest request, String loginMemberId
Expand Down
8 changes: 8 additions & 0 deletions gateway/src/main/java/com/oing/restapi/MeApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ MemberResponse getMe(
String loginMemberId
);

@Operation(summary = "내 가족 정보 조회", description = "내 가족 정보를 조회합니다.")
@GetMapping("/family-info")
FamilyResponse getMyFamily(
@Parameter(hidden = true)
@LoginMemberId
String loginMemberId
);

@Operation(summary = "FCM 토큰 등록", description = "FCM 토큰을 등록합니다.")
@PostMapping("/fcm")
DefaultResponse registerFcmToken(
Expand Down

0 comments on commit 7c3c037

Please sign in to comment.