Browse Source

Bugfix/user endpoint of admin control panel (#6021)

* Fix user endpoint

* Update changelog
pull/6024/head
Thomas Kaul 11 hours ago
committed by GitHub
parent
commit
be947f3710
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 21
      apps/api/src/app/admin/admin.service.ts

1
CHANGELOG.md

@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the country weightings in the _Financial Modeling Prep_ service
- Improved the search functionality by name in the _Financial Modeling Prep_ service
- Resolved an issue in the user endpoint where the list was returning empty in the admin control panel’s users section
## 2.220.0 - 2025-11-29

21
apps/api/src/app/admin/admin.service.ts

@ -532,12 +532,7 @@ export class AdminService {
this.countUsersWithAnalytics(),
this.getUsersWithAnalytics({
skip,
take,
where: {
NOT: {
analytics: null
}
}
take
})
]);
@ -855,6 +850,20 @@ export class AdminService {
}
}
];
const noAnalyticsCondition: Prisma.UserWhereInput['NOT'] = {
analytics: null
};
if (where) {
if (where.NOT) {
where.NOT = { ...where.NOT, ...noAnalyticsCondition };
} else {
where.NOT = noAnalyticsCondition;
}
} else {
where = { NOT: noAnalyticsCondition };
}
}
const usersWithAnalytics = await this.prismaService.user.findMany({

Loading…
Cancel
Save