diff --git a/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/subscribeWebhook.ts b/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/subscribeWebhook.ts index 1b560c6de5..71979796db 100644 --- a/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/subscribeWebhook.ts +++ b/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/subscribeWebhook.ts @@ -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 diff --git a/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/unsubscribeWebhook.ts b/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/unsubscribeWebhook.ts index 4ac124ca4d..9f7209f926 100644 --- a/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/unsubscribeWebhook.ts +++ b/apps/viewer/pages/api/typebots/[typebotId]/blocks/[blockId]/steps/[stepId]/unsubscribeWebhook.ts @@ -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()