[AB-106] renaming deletion days to deletion duration

This commit is contained in:
Sheldan
2023-09-26 00:58:01 +02:00
parent f97fe42e65
commit a608fba082
3 changed files with 3 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ public class BanReasonUpdatedListener implements InfractionUpdatedDescriptionLis
Duration deletionDuration = infraction
.getParameters()
.stream()
.filter(infractionParameter -> infractionParameter.getInfractionParameterId().getName().equals(BanService.INFRACTION_PARAMETER_DELETION_DAYS_KEY))
.filter(infractionParameter -> infractionParameter.getInfractionParameterId().getName().equals(BanService.INFRACTION_PARAMETER_DELETION_DURATION_KEY))
.findAny()
.map(InfractionParameter::getValue)
.map(Duration::parse)

View File

@@ -88,7 +88,7 @@ public class BanServiceBean implements BanService {
AUserInAServer bannedUser = userInServerManagementService.loadOrCreateUser(guild.getIdLong(), user.getIdLong());
AUserInAServer banningUser = userInServerManagementService.loadOrCreateUser(banningMember);
Map<String, String> parameters = new HashMap<>();
parameters.put(INFRACTION_PARAMETER_DELETION_DAYS_KEY, deletionDuration.toString());
parameters.put(INFRACTION_PARAMETER_DELETION_DURATION_KEY, deletionDuration.toString());
return infractionService.createInfractionWithNotification(bannedUser, infractionPoints, BAN_INFRACTION_TYPE, reason, banningUser, parameters, banLogMessage)
.thenApply(Infraction::getId);
} else {