🐛 Fix absolute URL bug with ky on backend
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import ky from 'ky'
|
||||
import {
|
||||
WhatsAppCredentials,
|
||||
WhatsAppSendingMessage,
|
||||
} from '@typebot.io/schemas/features/whatsapp'
|
||||
import { env } from '@typebot.io/env'
|
||||
import got from 'got'
|
||||
|
||||
type Props = {
|
||||
to: string
|
||||
@@ -16,7 +16,7 @@ export const sendWhatsAppMessage = async ({
|
||||
message,
|
||||
credentials,
|
||||
}: Props) =>
|
||||
ky.post(
|
||||
got.post(
|
||||
`${env.WHATSAPP_CLOUD_API_URL}/v17.0/${credentials.phoneNumberId}/messages`,
|
||||
{
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user