Skip to content

Commit

Permalink
Merge pull request #300 from MOONSHOT-Team/feature/#299
Browse files Browse the repository at this point in the history
[Fix]#299 - 닉네임 설정 안되는 이슈 해결
  • Loading branch information
0lynny authored Jul 29, 2024
2 parents 56eaa0b + e6bc2cb commit bac53da
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 bac53da

Please sign in to comment.