Skip to content

Scheduling infrastructure for absolutely everyone.

fix: stripe integration in `EventTypeSettings` atom (#20919)

Rajiv Sahal7127c6011644
diff --git a/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts b/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts
index 1cccf75aef0..bd469ec0866 100644
--- a/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts
+++ b/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts
@@ -226,20 +226,26 @@ export class EventTypesAtomService {
} else {
credentials = credentials.concat(teamAppCredentials);
}
+ } else {
+ if (slug !== "stripe") {
+ // We only add delegationCredentials if the request for location options is for a user because DelegationCredential Credential is applicable to Users only.
+ const { credentials: allCredentials } =
+ await enrichUserWithDelegationConferencingCredentialsWithoutOrgId({
+ user: {
+ ...user,
+ credentials,
+ },
+ });
+ credentials = allCredentials;
+ }
}
- // We only add delegationCredentials if the request for location options is for a user because DelegationCredential Credential is applicable to Users only.
- const { credentials: allCredentials } = await enrichUserWithDelegationConferencingCredentialsWithoutOrgId(
+
+ const enabledApps = await getEnabledAppsFromCredentials(
+ credentials as unknown as CredentialDataWithTeamName[],
{
- user: {
- ...user,
- credentials,
- },
+ where: { slug },
}
);
- credentials = allCredentials;
- const enabledApps = await getEnabledAppsFromCredentials(allCredentials, {
- where: { slug },
- });
const apps = await Promise.all(
enabledApps
.filter(({ ...app }) => app.slug === slug)