fix: fetchUsers to fetchUsersV2 for backward compatibility

This commit is contained in:
mirarifhasan
2024-01-30 12:58:25 +06:00
committed by Andrew Bastin
parent b53cbb093c
commit 2eab86476e
4 changed files with 46 additions and 8 deletions

View File

@@ -46,17 +46,29 @@ export class AdminService {
private readonly configService: ConfigService,
) {}
/**
* Fetch all the users in the infra.
* @param cursorID Users uid
* @param take number of users to fetch
* @returns an Either of array of user or error
* @deprecated use fetchUsersV2 instead
*/
async fetchUsers(cursorID: string, take: number) {
const allUsers = await this.userService.fetchAllUsers(cursorID, take);
return allUsers;
}
/**
* Fetch all the users in the infra.
* @param searchString search on users displayName or email
* @param paginationOption pagination options
* @returns an Either of array of user or error
*/
async fetchUsers(
async fetchUsersV2(
searchString: string,
paginationOption: OffsetPaginationArgs,
) {
const allUsers = await this.userService.fetchAllUsers(
const allUsers = await this.userService.fetchAllUsersV2(
searchString,
paginationOption,
);