fixed image moderation and dell redis config
This commit is contained in:
@@ -44,7 +44,12 @@ public class PostModerationExecutorService {
|
||||
.map(this::toMultipartFile)
|
||||
.toList();
|
||||
|
||||
contentModerationFacade.moderate(post.getTitle(), post.getDescription(), images);
|
||||
Boolean approved = contentModerationFacade.moderate(post.getTitle(), post.getDescription(), images);
|
||||
|
||||
if (approved == null) {
|
||||
log.warn("Пост {} не отмодерирован из-за недоступности AI, статус не меняем", post.getId());
|
||||
return;
|
||||
}
|
||||
|
||||
postRepository.updateStatus(postId, PostStatus.ACTIVE);
|
||||
log.info("Пост {} прошёл модерацию.", post.getId());
|
||||
|
||||
Reference in New Issue
Block a user