-
Notifications
You must be signed in to change notification settings - Fork 9.3k
fix: stripe integration in EventTypeSettings
atom
#20919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9453aa9
5a36d64
6b9f99b
54c0448
192da7b
8325610
2a29d7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,20 +226,26 @@ export class EventTypesAtomService { | |
} else { | ||
credentials = credentials.concat(teamAppCredentials); | ||
} | ||
} else { | ||
if (slug !== "stripe") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider inverting the condition to return early and reduce nesting |
||
// 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( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type assertion from credentials to CredentialDataWithTeamName[] is a code smell that suggests a type mismatch. Consider fixing the types properly. |
||
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) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing rationale for special treatment of Stripe integration in comments