fix: direct links for teams are generated wrong (#1197)

use `NEXT_PUBLIC_WEBAPP_URL()` for the base URL.
This commit is contained in:
Lucas Smith
2024-06-26 11:50:20 +10:00
committed by GitHub

View File

@@ -481,7 +481,9 @@ export const createDocumentFromDirectTemplate = async ({
const emailTemplate = createElement(DocumentCreatedFromDirectTemplateEmailTemplate, { const emailTemplate = createElement(DocumentCreatedFromDirectTemplateEmailTemplate, {
recipientName: directRecipientEmail, recipientName: directRecipientEmail,
recipientRole: directTemplateRecipient.role, recipientRole: directTemplateRecipient.role,
documentLink: `${formatDocumentsPath(document.team?.url)}/${document.id}`, documentLink: `${NEXT_PUBLIC_WEBAPP_URL()}${formatDocumentsPath(document.team?.url)}/${
document.id
}`,
documentName: document.title, documentName: document.title,
assetBaseUrl: NEXT_PUBLIC_WEBAPP_URL() || 'http://localhost:3000', assetBaseUrl: NEXT_PUBLIC_WEBAPP_URL() || 'http://localhost:3000',
}); });