Skip to content

Commit 823669e

Browse files
committed
refactor: 프로필 없을때 403 반환
1 parent 501834b commit 823669e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/example/log4u/domain/user/controller/UserController.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ public ResponseEntity<UserProfileResponseDto> getMyProfile(
8686
@AuthenticationPrincipal CustomOAuth2User customOAuth2User
8787
) {
8888
if (customOAuth2User.getRole().equals("ROLE_GUEST")) {
89-
return ResponseEntity.status(HttpStatus.FOUND)
90-
.location(URI.create(UrlConstants.PROFILE_CREATE_URL))
91-
.build();
89+
return ResponseEntity.status(HttpStatus.FORBIDDEN).build();
9290
}
9391

9492
UserProfileResponseDto userProfileResponseDto =

0 commit comments

Comments
 (0)