Skip to content

Commit

Permalink
[Fix]#299 - 닉네임 설정 안되는 이슈 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
0lynny committed Jul 29, 2024
1 parent 56eaa0b commit e6bc2cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ public void logout(final Long userId) {
}

public void withdrawal(final Long userId) {
User user = userRepository.findByIdWithCache(userId)
User user = userRepository.findById(userId)
.orElseThrow(() -> new NotFoundException(NOT_FOUND_USER));

user.setDeleteAt();
jwtTokenProvider.deleteRefreshToken(userId);
}

public void modifyProfile(final Long userId, final UserInfoRequest request) {
User user = userRepository.findByIdWithCache(userId)
User user = userRepository.findById(userId)
.orElseThrow(() -> new NotFoundException(NOT_FOUND_USER));

if (hasChange(request.nickname())) {
Expand All @@ -74,13 +74,13 @@ public void modifyProfile(final Long userId, final UserInfoRequest request) {
}

public UserInfoResponse getMyProfile(final Long userId) {
User user = userRepository.findByIdWithCache(userId)
User user = userRepository.findById(userId)
.orElseThrow(() -> new NotFoundException(NOT_FOUND_USER));
return UserInfoResponse.of(user);
}

public void updateUserProfileImage(final Long userId, final String imageUrl) {
User user = userRepository.findByIdWithCache(userId).orElseThrow(() -> new NotFoundException(NOT_FOUND_USER));
User user = userRepository.findById(userId).orElseThrow(() -> new NotFoundException(NOT_FOUND_USER));
user.modifyProfileImage(imageUrl);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
import org.moonshot.util.MDCUtil;
import org.moonshot.util.StringUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

@Slf4j
@Setter
@Component
@Profile("!local")
@RequiredArgsConstructor
public class DiscordAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {

Expand Down

0 comments on commit e6bc2cb

Please sign in to comment.