This commit is contained in:
bootunloader
2024-09-19 13:36:34 +03:00
parent fddcf7e858
commit 0fb8ba7ff4

View File

@@ -140,6 +140,7 @@ const getRandomDistributor = async (): Promise<ApiUser> => {
const ignoreList = ["001OP9"];
const randomUser = await _getRandomUser(ApiUserTypes.DISTRIBUTOR, ignoreList);
if (!randomUser) {
console.log("getting random distributor....");
return DEFAULT_RANDOM_DISTRIBUTOR;
}
return randomUser as any as ApiUser;
@@ -162,6 +163,7 @@ const _getRandomUser = async (
)
)[0];
if (rizzult.status == "OK") {
console.log("found random user");
return rizzult.result[0];
}
};