fix(plugin-stripe): properly types async webhooks (#7317)
This commit is contained in:
@@ -70,8 +70,6 @@ const typescriptRules = {
|
||||
'@typescript-eslint/no-unsafe-argument': 'off',
|
||||
'@typescript-eslint/no-unsafe-return': 'off',
|
||||
'@typescript-eslint/unbound-method': 'warn',
|
||||
// This rule doesn't work well in .tsx files
|
||||
'@typescript-eslint/no-misused-promises': 'off',
|
||||
'@typescript-eslint/consistent-type-imports': 'warn',
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
// Type-aware any rules end
|
||||
|
||||
@@ -8,7 +8,7 @@ export type StripeWebhookHandler<T = any> = (args: {
|
||||
pluginConfig?: StripePluginConfig
|
||||
req: PayloadRequest
|
||||
stripe: Stripe
|
||||
}) => void
|
||||
}) => Promise<void> | void
|
||||
|
||||
export type StripeWebhookHandlers = {
|
||||
[webhookName: string]: StripeWebhookHandler
|
||||
|
||||
@@ -9,8 +9,6 @@ export const syncPriceJSON = async (args) => {
|
||||
|
||||
const { id: eventID, default_price } = event.data.object
|
||||
|
||||
console.log(event.data.object)
|
||||
|
||||
let payloadProductID
|
||||
|
||||
// First lookup the product in Payload
|
||||
|
||||
Reference in New Issue
Block a user