Feature/Include user role in admin endpoint (#3107)

* Include user role in admin endpoint
pull/3114/head
Gerard Du Pre 4 months ago committed by GitHub
parent c641c28b12
commit 77358eed65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -440,13 +440,14 @@ export class AdminService {
},
createdAt: true,
id: true,
role: true,
Subscription: true
},
take: 30
});
return usersWithAnalytics.map(
({ _count, Analytics, createdAt, id, Subscription }) => {
({ _count, Analytics, createdAt, id, role, Subscription }) => {
const daysSinceRegistration =
differenceInDays(new Date(), createdAt) + 1;
const engagement = Analytics
@ -466,6 +467,7 @@ export class AdminService {
createdAt,
engagement,
id,
role,
subscription,
accountCount: _count.Account || 0,
country: Analytics?.country,

@ -1,3 +1,5 @@
import { Role } from '@prisma/client';
import { UniqueAsset } from './unique-asset.interface';
export interface AdminData {
@ -16,6 +18,7 @@ export interface AdminData {
engagement: number;
id: string;
lastActivity: Date;
role: Role;
transactionCount: number;
}[];
version: string;

Loading…
Cancel
Save