Skip to content

Commit

Permalink
cleanup: remove some debugging leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
jbranchaud authored and kodiakhq[bot] committed Mar 16, 2024
1 parent 4352935 commit 9687252
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions packages/skill-api/src/core/services/process-stripe-webhook.ts
Expand Up @@ -35,9 +35,6 @@ export async function receiveInternalStripeWebhooks({
params: SkillRecordingsHandlerParams
paymentOptions: PaymentOptions | undefined
}): Promise<OutgoingResponse> {
let event: any
let body: any

try {
const {
req,
Expand All @@ -59,22 +56,13 @@ export async function receiveInternalStripeWebhooks({
stripeCtx: {stripe: defaultStripe},
}

body = req.body
event = req.body.event
const event = req.body.event

return await processStripeWebhook(event, {
nextAuthOptions,
paymentOptions: _paymentOptions,
})
} catch (error: any) {
console.log(
`webhook/stripe-internal error: ${JSON.stringify({
message: error.message,
event: event,
body: body,
})}`,
)

return {
status: 500,
body: {error: true, message: error.message},
Expand Down

0 comments on commit 9687252

Please sign in to comment.