Skip to content

Commit

Permalink
Merge pull request #37 from GPGT-Algorithm-Study/develop
Browse files Browse the repository at this point in the history
[Fix] 오늘의 문제 해결 알림 버그 수정
  • Loading branch information
fing9 authored May 26, 2024
2 parents a829ccf + c2a87cf commit 8e3ac79
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ public void updateUserInfo(String bojHandle) {
.orElseThrow(() -> new IllegalArgumentException("존재하지 않는 유저입니다."));

// 오늘 문제 푼 것을 축하하는 알림을 발행한다.
if (user.getIsTodaySolved() == false) {
Boolean isTodaySolved = userSolvedProblemService.isTodaySolved(user.getBojHandle());
if (!user.getIsTodaySolved() && isTodaySolved) {
notifyService.systemPublish(user.getBojHandle(), "😊🥳 오늘도 문제를 해결하셨네요! 정말 정말 잘 했어요!",
NotifyType.SYSTEM, null);
}

user.setIsTodaySolved(userSolvedProblemService.isTodaySolved(user.getBojHandle()));
user.setIsTodaySolved(isTodaySolved);
user.setTodaySolvedProblemCount(
userSolvedProblemService.getTodaySolvedProblemCount(user.getBojHandle()));
userRepository.save(user);
Expand All @@ -88,12 +89,13 @@ public void updateAllUserInfo() {
User user = users.get(i);

// 오늘 문제 푼 것을 축하하는 알림을 발행한다.
if (user.getIsTodaySolved() == false) {
Boolean isTodaySolved = userSolvedProblemService.isTodaySolved(user.getBojHandle());
if (!user.getIsTodaySolved() && isTodaySolved) {
notifyService.systemPublish(user.getBojHandle(), "😊🥳 오늘도 문제를 해결하셨네요! 정말 정말 잘 했어요!",
NotifyType.SYSTEM, null);
}

user.setIsTodaySolved(userSolvedProblemService.isTodaySolved(user.getBojHandle()));
user.setIsTodaySolved(isTodaySolved);
user.setTodaySolvedProblemCount(
userSolvedProblemService.getTodaySolvedProblemCount(user.getBojHandle()));
userRepository.save(user);
Expand Down

0 comments on commit 8e3ac79

Please sign in to comment.