Add history page

This commit is contained in:
2025-04-11 21:20:02 +02:00
parent 4b891dd672
commit 2289b14b5a
16 changed files with 199 additions and 25 deletions
@@ -72,7 +72,7 @@ public class HistoryApiController implements HistoryApi {
UserType userTypeEnum = UserType.getUserType(userType);
HistoryType historyTypeEnum = HistoryType.getHistoryType(type);
CompletableFuture<List<String>> playerGroupFuture = new CompletableFuture<>();
Connection.getConnection(Databases.LITE_BANS)
.runQuery(sqlSession -> {
log.debug("Loading user names for type {}", type);
@@ -93,9 +93,9 @@ public class HistoryApiController implements HistoryApi {
PunishmentHistoryInnerDto innerDto = new PunishmentHistoryInnerDto()
.uuid(historyRecord.getUuid())
.username(historyRecord.getPunishedName())
.reason(historyRecord.getReason())
.punishmentUserUuid(historyRecord.getBannedByUuid())
.punishmentUser(historyRecord.getBannedByName())
.reason(PunishmentHistoryInnerDto.ReasonEnum.valueOf(historyRecord.getReason()))
.punishedByUuid(historyRecord.getBannedByUuid())
.punishedBy(historyRecord.getBannedByName())
.removedBy(historyRecord.getRemovedByName())
.punishmentTime(historyRecord.getTime())
.expiryTime(historyRecord.getUntil())