feat: add moderation center for reports and ratings with user cleanup cron job

This commit is contained in:
2026-10-16 07:23:00 +02:00
parent af6ec84cd0
commit edcb229c42
7 changed files with 126 additions and 17 deletions

View File

@@ -36,7 +36,7 @@ export async function POST(
}
// 2. Security: Only the owner of the business can reply
if (rating.business.ownerId !== userId) {
if (!rating.business || rating.business.ownerId !== userId) {
return NextResponse.json({ error: 'Action non autorisée. Seul l\'entrepreneur concerné peut répondre.' }, { status: 403 });
}