💚 Fix sentry not receiving events
This commit is contained in:
@ -6,7 +6,6 @@ import {
|
||||
notAuthenticated,
|
||||
} from 'utils/api'
|
||||
import Stripe from 'stripe'
|
||||
import { withSentry } from '@sentry/nextjs'
|
||||
import { getAuthenticatedUser } from '@/features/auth/api'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { WorkspaceRole } from 'db'
|
||||
@ -39,4 +38,4 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
return methodNotAllowed(res)
|
||||
}
|
||||
|
||||
export default withSentry(handler)
|
||||
export default handler
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { withSentry } from '@sentry/nextjs'
|
||||
import { Plan } from 'db'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
@ -58,4 +57,4 @@ const createCheckoutSession = async (userId: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
export default withSentry(handler)
|
||||
export default handler
|
||||
|
@ -6,7 +6,6 @@ import {
|
||||
notAuthenticated,
|
||||
} from 'utils/api'
|
||||
import Stripe from 'stripe'
|
||||
import { withSentry } from '@sentry/nextjs'
|
||||
import { getAuthenticatedUser } from '@/features/auth/api'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { WorkspaceRole } from 'db'
|
||||
@ -46,4 +45,4 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
return methodNotAllowed(res)
|
||||
}
|
||||
|
||||
export default withSentry(handler)
|
||||
export default handler
|
||||
|
@ -7,7 +7,6 @@ import {
|
||||
notAuthenticated,
|
||||
} from 'utils/api'
|
||||
import Stripe from 'stripe'
|
||||
import { withSentry } from '@sentry/nextjs'
|
||||
import { getAuthenticatedUser } from '@/features/auth/api'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { Plan, WorkspaceRole } from 'db'
|
||||
@ -258,4 +257,4 @@ const parseSubscriptionItems = (
|
||||
: []
|
||||
)
|
||||
|
||||
export default withSentry(handler)
|
||||
export default handler
|
||||
|
@ -4,7 +4,6 @@ import Stripe from 'stripe'
|
||||
import Cors from 'micro-cors'
|
||||
import { buffer } from 'micro'
|
||||
import prisma from '@/lib/prisma'
|
||||
import { withSentry } from '@sentry/nextjs'
|
||||
import { Plan } from 'db'
|
||||
|
||||
if (!process.env.STRIPE_SECRET_KEY || !process.env.STRIPE_WEBHOOK_SECRET)
|
||||
@ -128,4 +127,4 @@ const webhookHandler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
return methodNotAllowed(res)
|
||||
}
|
||||
|
||||
export default withSentry(cors(webhookHandler as any))
|
||||
export default cors(webhookHandler as any)
|
||||
|
Reference in New Issue
Block a user