@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user