diff --git a/src/main/java/com/numberone/backend/domain/member/dto/response/MemberIdResponse.java b/src/main/java/com/numberone/backend/domain/member/dto/response/MemberIdResponse.java index cc5de082..47c5c752 100644 --- a/src/main/java/com/numberone/backend/domain/member/dto/response/MemberIdResponse.java +++ b/src/main/java/com/numberone/backend/domain/member/dto/response/MemberIdResponse.java @@ -1,5 +1,6 @@ package com.numberone.backend.domain.member.dto.response; +import com.numberone.backend.domain.member.entity.Member; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; @@ -9,10 +10,14 @@ @Builder public class MemberIdResponse { private Long memberId; + private String nickname; + private String realname; - public static MemberIdResponse of(long memberId){ + public static MemberIdResponse of(Member member) { return MemberIdResponse.builder() - .memberId(memberId) + .memberId(member.getId()) + .nickname(member.getNickName()) + .realname(member.getRealName()) .build(); } } diff --git a/src/main/java/com/numberone/backend/domain/member/service/MemberService.java b/src/main/java/com/numberone/backend/domain/member/service/MemberService.java index b01aaf44..bf3ebb1c 100644 --- a/src/main/java/com/numberone/backend/domain/member/service/MemberService.java +++ b/src/main/java/com/numberone/backend/domain/member/service/MemberService.java @@ -107,7 +107,7 @@ public GetNotificationRegionResponse getNotificationRegionLv2() { public MemberIdResponse online(String email) { Member member = findByEmail(email); member.updateSession(true); - return MemberIdResponse.of(member.getId()); + return MemberIdResponse.of(member); } @Transactional