Skip to content

Commit

Permalink
unequals
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Gorzala committed Dec 26, 2023
1 parent 360ea3e commit 3cc5788
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
- ./volumes/dancer-data:/var/lib/postgresql/data

pg-admin:
image: dpage/pgadmin4:7
image: dpage/pgadmin4:8.1
restart: always
ports:
- "5050:80"
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/net/dancier/dancer/core/ProfileService.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,16 @@ public void updateProfileForUserId(UUID userId, ProfileOfCurrentUserDto profileO
handleDancerProfiles(dancer, profileOfCurrentUserDto);
dancer.setUpdatedAt(Instant.now());
dancerRepository.save(dancer);
if (dancer.getVersion().equals(oldVersion)) {
log.info("{}/{}", dancer.getVersion(), oldVersion);
if (!dancer.getVersion().equals(oldVersion)) {
log.info("Profile-Change detected");
log.info("{}/{}", dancer.getVersion(), oldVersion);
applicationEventPublisher.publishEvent(
ProfileUpdatedEvent
.builder()
.dancer(dancer)
.build());
} else {
log.info("Version unchanged");
}
}

Expand Down

0 comments on commit 3cc5788

Please sign in to comment.