fix: only count attended events in profile statistics

- Update getUserProfile to count only eventRegistrations where attended=true
- This ensures 'Events Attended' shows actual attended events, not just registrations
- Impact score calculation already had this logic and remains unchanged

Now 'Events Attended' will only increment after an event is completed and marked as attended
This commit is contained in:
2025-11-16 21:50:19 +00:00
parent cc7298bc56
commit fdeaa4ff3a

View File

@@ -85,7 +85,9 @@ export class UserService {
_count: {
select: {
reports: true,
eventRegistrations: true,
eventRegistrations: {
where: { attended: true },
},
organizedEvents: true,
},
},