feat: report reviews etc ...
This commit is contained in:
@@ -8,6 +8,7 @@ use App\Enums\ReportStatus;
|
||||
use App\Enums\UserRole;
|
||||
use App\Models\MealPosts;
|
||||
use App\Models\ModerationCase;
|
||||
use App\Models\PostReviews;
|
||||
use App\Models\Report;
|
||||
use App\Models\User;
|
||||
use Filament\Notifications\Notification as FilamentNotification;
|
||||
@@ -135,6 +136,12 @@ class ModerationReportService
|
||||
422,
|
||||
__('api.reports.cannot_report_own_meal'),
|
||||
);
|
||||
|
||||
abort_if(
|
||||
$reportable instanceof PostReviews && $reportable->user_id === $reporter->getKey(),
|
||||
422,
|
||||
__('api.reports.cannot_report_own_review'),
|
||||
);
|
||||
}
|
||||
|
||||
private function isDuplicateReportException(QueryException $exception): bool
|
||||
|
||||
Reference in New Issue
Block a user