Browse Source

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

* Fix user endpoint

* Update changelog
pull/6025/head
Thomas Kaul 6 days ago
committed by Raj Gupta
parent
commit
3576cdf85b
  1. 1
      CHANGELOG.md
  2. 21
      apps/api/src/app/admin/admin.service.ts

1
CHANGELOG.md

@ -22,6 +22,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