feat(Moderation): enhance moderation reporting and user feedback
All checks were successful
Deploy to production / deploy (push) Successful in 1m55s

- Added user blocking checks in authentication and reporting processes, returning appropriate error responses.
- Expanded moderation report functionality to include new target types and optional fields for reports.
- Implemented a new API endpoint to retrieve the count of open moderation reports.
- Enhanced frontend components to allow users to report profiles, images, and guestbook entries, with corresponding UI updates.
- Updated internationalization files to include new strings for reporting features in both German and English.
This commit is contained in:
Torsten Schulz (local)
2026-04-27 15:57:02 +02:00
parent e94ae4350d
commit 530855e26e
16 changed files with 417 additions and 20 deletions

View File

@@ -1663,9 +1663,15 @@ class AdminService {
}
if (typeof data.active === 'boolean') {
updates.active = data.active;
if (data.active === false) {
updates.authCode = null;
}
}
if (Object.keys(updates).length === 0) return { id: user.hashedId, username: user.username, active: user.active };
await user.update(updates);
if (typeof data.active === 'boolean') {
await notifyUser(user.hashedId, 'userAccessChanged', { active: !!data.active });
}
return { id: user.hashedId, username: user.username, active: user.active };
}