Skip to content

Commit

Permalink
feat: change annotation to loginfamilyid
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Jul 22, 2024
1 parent a65e877 commit c66fefd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions gateway/src/main/java/com/oing/controller/MeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ public MemberResponse getMe(String loginMemberId) {
}

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

Expand Down
5 changes: 3 additions & 2 deletions gateway/src/main/java/com/oing/restapi/MeApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.oing.dto.response.DefaultResponse;
import com.oing.dto.response.FamilyResponse;
import com.oing.dto.response.MemberResponse;
import com.oing.util.security.LoginFamilyId;
import com.oing.util.security.LoginMemberId;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down Expand Up @@ -39,8 +40,8 @@ MemberResponse getMe(
@GetMapping("/family-info")
FamilyResponse getMyFamily(
@Parameter(hidden = true)
@LoginMemberId
String loginMemberId
@LoginFamilyId
String loginFamilyId
);

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

0 comments on commit c66fefd

Please sign in to comment.