2
0

feat(integration): 🚸 Easy webhook config

This commit is contained in:
Baptiste Arnaud
2022-03-07 08:12:05 +01:00
parent 380eae545b
commit fd9c19a4c2
8 changed files with 234 additions and 110 deletions

View File

@ -0,0 +1,13 @@
import { withSentry } from '@sentry/nextjs'
import { NextApiRequest, NextApiResponse } from 'next'
import { methodNotAllowed } from 'utils'
const handler = (req: NextApiRequest, res: NextApiResponse) => {
console.log(req.method)
if (req.method === 'POST') {
return res.status(200).send(req.body)
}
return methodNotAllowed(res)
}
export default withSentry(handler)