Skip to content

Commit

Permalink
Merge pull request #180 from 42organization/GGBE-211-admin-user-put
Browse files Browse the repository at this point in the history
[fix] GGBE-211 user detail update수정
  • Loading branch information
wken5577 authored Jul 19, 2023
2 parents 65dd1f5 + 00bb300 commit d730521
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ public void deleteSeasonRankBySeasonId(Long seasonId) {

public void updateRankUser(String hashKey, String zsetKey, Long userId, RankRedis userRank) {
rankRedisRepository.updateRankData(hashKey, userId, userRank);
rankRedisRepository.deleteFromZSet(zsetKey, userId);
rankRedisRepository.addToZSet(zsetKey, userId, userRank.getPpp());
if (userPlayedRank(userRank)){
rankRedisRepository.deleteFromZSet(zsetKey, userId);
rankRedisRepository.addToZSet(zsetKey, userId, userRank.getPpp());
}
}

private boolean userPlayedRank(RankRedis userRank) {
return (userRank.getWins() + userRank.getLosses()) != 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ public ResponseEntity userUpdateDetail(@PathVariable String intraId,
}
userAdminService.updateUserDetail(intraId, updateUserInfo, imgData);

return new ResponseEntity(HttpStatus.OK);
return new ResponseEntity(HttpStatus.NO_CONTENT);
}
}

0 comments on commit d730521

Please sign in to comment.