2
0

chore(api): 📄 Change patch webhook to post

This commit is contained in:
Baptiste Arnaud
2022-02-22 14:41:55 +01:00
parent d49461cde6
commit 1c758d39e5
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import { authenticateUser } from 'services/api/utils'
import { isWebhookStep, methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
if (req.method === 'PATCH') {
if (req.method === 'POST') {
const user = await authenticateUser(req)
if (!user) return res.status(401).json({ message: 'Not authenticated' })
const body = req.body as Record<string, string>

View File

@ -8,7 +8,7 @@ import { omit } from 'services/utils'
import { isWebhookStep, methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
if (req.method === 'DELETE') {
if (req.method === 'POST') {
const user = await authenticateUser(req)
if (!user) return res.status(401).json({ message: 'Not authenticated' })
const typebotId = req.query.typebotId.toString()