|
|
@ -38,7 +38,7 @@ public class BanService { |
|
|
|
.getResultList(); |
|
|
|
return result.stream().map(Ban::new) |
|
|
|
.peek(ban -> ban.cryptIP(cryptedCookie)) |
|
|
|
.peek(ban -> ban.setAdmin_info(permitionService.getAdminInfo(ban.getModeration()))) |
|
|
|
.peek(ban -> ban.fillAdmins(permitionService)) |
|
|
|
.findFirst() |
|
|
|
.orElse(null); |
|
|
|
} |
|
|
@ -49,7 +49,7 @@ public class BanService { |
|
|
|
.getResultList(); |
|
|
|
return result.stream().map(Ban::new) |
|
|
|
.peek(ban -> ban.cryptIP(cryptedCookie)) |
|
|
|
.peek(ban -> ban.setAdmin_info(permitionService.getAdminInfo(ban.getModeration()))) |
|
|
|
.peek(ban -> ban.fillAdmins(permitionService)) |
|
|
|
.findFirst() |
|
|
|
.orElse(null); |
|
|
|
} |
|
|
@ -60,7 +60,7 @@ public class BanService { |
|
|
|
.getResultList(); |
|
|
|
return result.stream().map(Ban::new) |
|
|
|
.peek(ban -> ban.cryptIP(cryptedCookie)) |
|
|
|
.peek(ban -> ban.setAdmin_info(permitionService.getAdminInfo(ban.getModeration()))) |
|
|
|
.peek(ban -> ban.fillAdmins(permitionService)) |
|
|
|
.toList(); |
|
|
|
} |
|
|
|
|
|
|
@ -70,7 +70,7 @@ public class BanService { |
|
|
|
.setParameter(2, limit) |
|
|
|
.getResultStream().map(obj -> new Ban((Object[]) obj)).toList()).stream() |
|
|
|
.peek(ban -> ban.cryptIP(cryptedCookie)) |
|
|
|
.peek(ban -> ban.setAdmin_info(permitionService.getAdminInfo(ban.getModeration()))) |
|
|
|
.peek(ban -> ban.fillAdmins(permitionService)) |
|
|
|
.toList(); |
|
|
|
//этот каст конечно пиздец, но он работает
|
|
|
|
} |
|
|
|