Files
calendar/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials.ts
T
Shyam RaghuwanshiandGitHub 477e102388 feat: Split-large-code-file-functions (#13592)
* Split large code file functions

* move the files from root into lib
2024-02-16 10:32:00 -03:00

17 lines
419 B
TypeScript

import async from "async";
import type { CredentialPayload } from "@calcom/types/Credential";
import { refreshCredential } from "./refreshCredential";
/**
* Refreshes the given set of credentials.
*
* @param credentials
*/
export async function refreshCredentials(
credentials: Array<CredentialPayload>
): Promise<Array<CredentialPayload>> {
return await async.mapLimit(credentials, 5, refreshCredential);
}