@@ -18,7 +18,7 @@ import { And, ILike, IsNull, Not, Raw, Repository } from 'typeorm';
18
18
import { deleteCypressCrispProfiles } from '../api/crisp/crisp-api' ;
19
19
import { AuthService } from '../auth/auth.service' ;
20
20
import { PartnerAccessService , basePartnerAccess } from '../partner-access/partner-access.service' ;
21
- import { formatGetUsersObject , formatUserObject } from '../utils/serialize' ;
21
+ import { formatUserObject } from '../utils/serialize' ;
22
22
import { generateRandomString } from '../utils/utils' ;
23
23
import { CreateUserDto } from './dtos/create-user.dto' ;
24
24
import { GetUserDto } from './dtos/get-user.dto' ;
@@ -265,20 +265,12 @@ export class UserService {
265
265
partnerAccess ?: { userId : string ; featureTherapy : boolean ; active : boolean } ;
266
266
partnerAdmin ?: { partnerAdminId : string } ;
267
267
} ,
268
- relations : {
269
- partner ?: boolean ;
270
- partnerAccess ?: boolean ;
271
- partnerAdmin ?: boolean ;
272
- courseUser ?: boolean ;
273
- subscriptionUser ?: boolean ;
274
- therapySession ?: boolean ;
275
- eventLog ?: boolean ;
276
- } ,
268
+ relations : string [ ] ,
277
269
fields : Array < string > ,
278
270
limit : number ,
279
- ) : Promise < GetUserDto [ ] | undefined > {
271
+ ) : Promise < UserEntity [ ] | undefined > {
280
272
const users = await this . userRepository . find ( {
281
- relations : relations ,
273
+ relations,
282
274
where : {
283
275
...( filters . email && { email : ILike ( `%${ filters . email } %` ) } ) ,
284
276
...( filters . partnerAccess && {
@@ -305,9 +297,7 @@ export class UserService {
305
297
} ,
306
298
...( limit && { take : limit } ) ,
307
299
} ) ;
308
-
309
- const usersDto = users . map ( ( user ) => formatGetUsersObject ( user ) ) ;
310
- return usersDto ;
300
+ return users ;
311
301
}
312
302
313
303
// Static bulk upload function to be used in specific cases
0 commit comments