docs: 📝 Update env var and write Configuration doc
This commit is contained in:
@ -10,16 +10,16 @@ export const sendEmailNotification = ({
|
||||
content: string
|
||||
}) => {
|
||||
const transporter = createTransport({
|
||||
host: process.env.AUTH_EMAIL_SERVER_HOST,
|
||||
port: Number(process.env.AUTH_EMAIL_SERVER_PORT),
|
||||
host: process.env.SMTP_HOST,
|
||||
port: Number(process.env.SMTP_PORT),
|
||||
auth: {
|
||||
user: process.env.AUTH_EMAIL_SERVER_USER,
|
||||
pass: process.env.AUTH_EMAIL_SERVER_PASSWORD,
|
||||
user: process.env.SMTP_USERNAME,
|
||||
pass: process.env.SMTP_PASSWORD,
|
||||
},
|
||||
})
|
||||
|
||||
return transporter.sendMail({
|
||||
from: `"${process.env.AUTH_EMAIL_FROM_NAME}" <${process.env.AUTH_EMAIL_FROM_EMAIL}>`,
|
||||
from: process.env.NEXT_PUBLIC_SMTP_FROM,
|
||||
to,
|
||||
subject,
|
||||
html: content,
|
||||
|
@ -77,7 +77,7 @@ export const executeWebhook = (
|
||||
{ blockId, stepId }: { blockId: string; stepId: string }
|
||||
) =>
|
||||
sendRequest<WebhookResponse>({
|
||||
url: `${process.env.NEXT_PUBLIC_VIEWER_HOST}/api/typebots/${typebotId}/blocks/${blockId}/steps/${stepId}/executeWebhook`,
|
||||
url: `${process.env.NEXT_PUBLIC_VIEWER_URL}/api/typebots/${typebotId}/blocks/${blockId}/steps/${stepId}/executeWebhook`,
|
||||
method: 'POST',
|
||||
body: {
|
||||
variables,
|
||||
|
@ -135,3 +135,6 @@ export const timeSince = (date: string) => {
|
||||
}
|
||||
return Math.floor(seconds) + ' seconds'
|
||||
}
|
||||
|
||||
export const isCloudProdInstance = () =>
|
||||
window.location.hostname === 'app.typebot.io'
|
||||
|
Reference in New Issue
Block a user