Fix some minor issue in AgileCRM

This commit is contained in:
Jan Oberhauser 2020-05-22 21:17:27 +02:00
parent 69ba22fc9b
commit c0dfaed4d0
2 changed files with 6 additions and 4 deletions

View file

@ -24,6 +24,8 @@ export class AgileCrmApi implements ICredentialType {
name: 'subdomain',
type: 'string' as NodePropertyTypes,
default: '',
placeholder: 'example',
description: 'If the domain is https://example.agilecrm.com "example" would have to be entered.',
},
];
}

View file

@ -27,7 +27,7 @@ export async function agileCrmApiRequest(this: IHookFunctions | IExecuteFunction
username: credentials!.email as string,
password: credentials!.apiKey as string
},
uri: uri || `https://n8nio.agilecrm.com/dev/${endpoint}`,
uri: uri || `https://${credentials!.subdomain}.agilecrm.com/dev/${endpoint}`,
json: true,
};