Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#144] Refactor: Dto Inner Class 리펙토링 #145

Merged
merged 4 commits into from
Jun 11, 2024
Merged

Conversation

JunSang1121
Copy link
Collaborator

PULL REQUEST

🎋 Branch Name

refactor/#144

🔑 Main Contents

해당 Dto의 Entity에 따라 Dto Class를 분류 후 사용처에 맞게 InnerClass작성

🏞 Screenshots (Optional)

제목 없음

@JunSang1121 JunSang1121 added the ♻️ Refactor 코드 리팩토링 label Jun 11, 2024
@JunSang1121 JunSang1121 self-assigned this Jun 11, 2024
@JunSang1121 JunSang1121 linked an issue Jun 11, 2024 that may be closed by this pull request
@JunSang1121 JunSang1121 requested a review from tkguswls1106 June 11, 2024 17:48
Copy link
Member

@tkguswls1106 tkguswls1106 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTO 변수 네이밍 컨벤션 문제가 있어, 이들을 수정하고 재푸쉬 후 재리뷰 요청해주세요.

public static class SolvePageResponse {

// Problem
private ProblemDto.Response problemDto;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTO 변수 네이밍 컨벤션 문제 : problemDto -> problemResponseDto 수정 부탁드립니다.

private String code;

public SolvePageResponse(UserRoom entity, List<UserDto.Response> rankUserDtoList) {
this.problemDto = new ProblemDto.Response(entity.getRoom().getProblem());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTO 변수 네이밍 컨벤션 문제 : problemDto -> problemResponseDto 수정 부탁드립니다.

public ResponseEntity<ResponseData<TokenDto>> reissue(@RequestBody ReissueRequestDto reissueRequestDto) {
TokenDto tokenDto = authService.reissue(reissueRequestDto);
public ResponseEntity<ResponseData<AuthDto.TokenResponse>> reissue(@RequestBody AuthDto.ReissueRequest reissueRequestDto) {
AuthDto.TokenResponse tokenDto = authService.reissue(reissueRequestDto);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네이밍 컨벤션상, tokenDto -> tokenResponseDto가 옳습니다.

public ResponseEntity<ResponseData<TokenDto>> reissue(@RequestBody ReissueRequestDto reissueRequestDto) {
TokenDto tokenDto = authService.reissue(reissueRequestDto);
public ResponseEntity<ResponseData<AuthDto.TokenResponse>> reissue(@RequestBody AuthDto.ReissueRequest reissueRequestDto) {
AuthDto.TokenResponse tokenDto = authService.reissue(reissueRequestDto);
return ResponseData.toResponseEntity(ResponseCode.REISSUE_SUCCESS, tokenDto);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위와 같은 네이밍 컨벤션 문제가 있습니다.

@@ -37,7 +37,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
Long userId = oAuth2User.getUserId();
Role role = oAuth2User.getRole();

TokenDto tokenDto = tokenProvider.generateTokenDto(userId, role); // Access & Refresh 토큰 발행.
AuthDto.TokenResponse tokenDto = tokenProvider.generateTokenDto(userId, role); // Access & Refresh 토큰 발행.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTO 변수 네이밍 컨벤션 문제 : tokenDto -> tokenResponseDto 수정 부탁드립니다.

@@ -66,7 +66,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
}
}

public String makeRedirectUrl(TokenDto tokenDto, String frontendPath) {
public String makeRedirectUrl(AuthDto.TokenResponse tokenDto, String frontendPath) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTO 변수 네이밍 컨벤션 문제 : tokenDto -> tokenResponseDto 수정 부탁드립니다.

@@ -115,7 +112,7 @@ public TokenDto reissue(ReissueRequestDto reissueRequestDto) { // Refresh Token
throw new Exception400.TokenBadRequest("Refresh Token = " + refreshToken);
}

TokenDto tokenDto = tokenProvider.generateAccessTokenByRefreshToken(userId, role, refreshToken);
AuthDto.TokenResponse tokenDto = tokenProvider.generateAccessTokenByRefreshToken(userId, role, refreshToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DTO 변수 네이밍 컨벤션 문제 : tokenDto -> tokenResponseDto 수정 부탁드립니다.

@@ -115,7 +112,7 @@ public TokenDto reissue(ReissueRequestDto reissueRequestDto) { // Refresh Token
throw new Exception400.TokenBadRequest("Refresh Token = " + refreshToken);
}

TokenDto tokenDto = tokenProvider.generateAccessTokenByRefreshToken(userId, role, refreshToken);
AuthDto.TokenResponse tokenDto = tokenProvider.generateAccessTokenByRefreshToken(userId, role, refreshToken);
return tokenDto;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위와 마찬가지 이유로, 수정 부탁드립니다.

@JunSang1121 JunSang1121 requested a review from tkguswls1106 June 11, 2024 18:29
Copy link
Member

@tkguswls1106 tkguswls1106 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰사항 반영 확인되었습니다. Merge 승인합니다.

@JunSang1121 JunSang1121 merged commit ae1b9f4 into develop Jun 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ Refactor 코드 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor] Dto Inner Class 리펙토링
2 participants