2
0

ci: Fix e2e tests

This commit is contained in:
Baptiste Arnaud
2022-05-13 06:47:39 -07:00
parent 7507a1ab1e
commit e268638786
7 changed files with 65 additions and 18 deletions

View File

@ -0,0 +1,15 @@
import { withSentry } from '@sentry/nextjs'
import { NextApiRequest, NextApiResponse } from 'next'
import { methodNotAllowed } from 'utils'
const handler = (req: NextApiRequest, res: NextApiResponse) => {
if (req.method === 'POST') {
return res.status(500).json({
statusCode: 500,
statusMessage: 'Fail',
})
}
methodNotAllowed(res)
}
export default withSentry(handler)

View File

@ -0,0 +1,15 @@
import { withSentry } from '@sentry/nextjs'
import { NextApiRequest, NextApiResponse } from 'next'
import { methodNotAllowed } from 'utils'
const handler = (req: NextApiRequest, res: NextApiResponse) => {
if (req.method === 'POST') {
return res.status(200).json({
statusCode: 200,
statusMessage: 'OK',
})
}
methodNotAllowed(res)
}
export default withSentry(handler)