diff --git a/src/main/java/com/smunity/server/domain/account/dto/LoginResponseDto.java b/src/main/java/com/smunity/server/domain/account/dto/LoginResponseDto.java index d47a2eb..b613abc 100644 --- a/src/main/java/com/smunity/server/domain/account/dto/LoginResponseDto.java +++ b/src/main/java/com/smunity/server/domain/account/dto/LoginResponseDto.java @@ -1,17 +1,20 @@ package com.smunity.server.domain.account.dto; +import com.smunity.server.global.common.entity.enums.MemberRole; import lombok.Builder; @Builder public record LoginResponseDto( Long memberId, + MemberRole memberRole, String accessToken, String refreshToken ) { - public static LoginResponseDto of(Long memberId, String accessToken, String refreshToken) { + public static LoginResponseDto of(Long memberId, MemberRole memberRole, String accessToken, String refreshToken) { return LoginResponseDto.builder() .memberId(memberId) + .memberRole(memberRole) .accessToken(accessToken) .refreshToken(refreshToken) .build(); diff --git a/src/main/java/com/smunity/server/domain/account/service/AccountService.java b/src/main/java/com/smunity/server/domain/account/service/AccountService.java index b0260b8..4c9a53c 100644 --- a/src/main/java/com/smunity/server/domain/account/service/AccountService.java +++ b/src/main/java/com/smunity/server/domain/account/service/AccountService.java @@ -61,7 +61,7 @@ private LoginResponseDto generateToken(Long memberId, MemberRole memberRole) { String accessToken = jwtTokenProvider.createAccessToken(memberId, memberRole, false); String refreshToken = jwtTokenProvider.createAccessToken(memberId, memberRole, true); refreshTokenService.saveRefreshToken(memberId, refreshToken); - return LoginResponseDto.of(memberId, accessToken, refreshToken); + return LoginResponseDto.of(memberId, memberRole, accessToken, refreshToken); } private void validateUsername(String username) {