Skip to content

Commit

Permalink
changed the bulk update feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sondermanish committed Aug 14, 2024
1 parent b6a785b commit de97f53
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ private Mono<Boolean> archiveTheme(List<String> themeIds) {
}

private Mono<List<Theme>> updateTheme(List<Theme> themes) {
return themeRepository.bulkUpdate(themes).thenReturn(themes);
return Flux.fromIterable(themes)
.flatMap(themeToBeUpdated -> {
return themeRepository.updateById(
themeToBeUpdated.getId(), themeToBeUpdated, AclPermission.MANAGE_THEMES);
})
.collectList();
}

private Mono<Application> updateApplication(Application application) {
Expand Down

0 comments on commit de97f53

Please sign in to comment.