2
0

🔧 Update main viewer domain to typebot.co

This commit is contained in:
Baptiste Arnaud
2023-12-08 08:51:58 +00:00
parent c339130e53
commit 8819e9e567
2 changed files with 4 additions and 2 deletions

View File

@ -448,7 +448,9 @@ const Webhook = ({
credentialsId: string
}) => {
const { workspace } = useWorkspace()
const webhookUrl = `${env.NEXT_PUBLIC_VIEWER_URL[0]}/api/v1/workspaces/${workspace?.id}/whatsapp/${credentialsId}/webhook`
const webhookUrl = `${
env.NEXT_PUBLIC_VIEWER_URL.at(1) ?? env.NEXT_PUBLIC_VIEWER_URL[0]
}/api/v1/workspaces/${workspace?.id}/whatsapp/${credentialsId}/webhook`
return (
<Stack spacing={6}>

View File

@ -59,7 +59,7 @@ export const parseApiHost = (
customDomain: Typebot['customDomain'] | undefined
) => {
if (customDomain) return new URL(`https://${customDomain}`).origin
return env.NEXT_PUBLIC_VIEWER_URL[0]
return env.NEXT_PUBLIC_VIEWER_URL.at(1) ?? env.NEXT_PUBLIC_VIEWER_URL[0]
}
export const parseApiHostValue = (