fix(ERPNext Node): Fix issue with credential test and add frappe cloud url (#6283)

This commit is contained in:
Jon
2023-05-22 11:11:08 +01:00
committed by GitHub
parent 37506050c3
commit 2a2b6452dc
2 changed files with 35 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ import { NodeApiError } from 'n8n-workflow';
* Return the base API URL based on the user's environment.
*/
const getBaseUrl = ({ environment, domain, subdomain }: ERPNextApiCredentials) =>
environment === 'cloudHosted' ? `https://${subdomain}.erpnext.com` : domain;
environment === 'cloudHosted' ? `https://${subdomain}.${domain}` : domain;
export async function erpNextApiRequest(
this: IExecuteFunctions | IWebhookFunctions | IHookFunctions | ILoadOptionsFunctions,