dev add reason entity
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-03-27 17:31:06 +07:00
parent 964910ec69
commit 9a8a4a72f4
3 changed files with 24 additions and 15 deletions
@@ -92,7 +92,7 @@ public class ModerationService {
throw new SecurityException("User is not the owner of this file");
}
if (canAppeal(file)) {
if (!canAppeal(file)) {
throw new InvalidAppealException("Cannot appeal this file. Current status: " + file.getStatus());
}
@@ -150,6 +150,7 @@ public class ModerationService {
moderationLogRepository.save(log);
fileEntityRepository.save(file);
fileAppealRepository.save(appeal);
}