Skip to content

Commit

Permalink
idiot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SametBasturkk committed Sep 7, 2024
1 parent d04814d commit bd51b4d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public void updateCounterStatistic(Long compressedSize, Long originalSize, Strin
if (user == null) {
log.error("User not found creating entry");
userRepository.save(new User(username, 0, 0, 0, new Date()));
user = userRepository.findByUsername(username);
}

user.setTotalImagesProcessed(user.getTotalImagesProcessed() + 1);
user.setTotalBytesProcessed(user.getTotalBytesProcessed() + originalSize);
user.setTotalBytesSaved(user.getTotalBytesSaved() + (originalSize - compressedSize));
Expand Down

0 comments on commit bd51b4d

Please sign in to comment.