throw new UserErrorException("Пользователь уже блокирован");
}
Map<String, Object> params = new HashMap<>();
params.put("message", "Удалено");
DeleteCommentResult deleteCommentResult = commentService.deleteAllCommentsAndBlock(user, moderator, reason);
logger.info("User " + user.getNick() + " blocked by " + moderator.getNick());
params.put("bigMessage",
"Удалено комментариев: "+deleteCommentResult.getDeletedCommentIds().size()+"<br>"+
"Удалено тем: "+deleteCommentResult.getDeletedTopicIds().size()
);
for (int topicId : deleteCommentResult.getDeletedTopicIds()) {
searchQueueSender.updateMessage(topicId, true);
}
searchQueueSender.updateComment(deleteCommentResult.getDeletedCommentIds());
return new ModelAndView("action-done", params);
}