mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ Fix some minor issue in AgileCRM
This commit is contained in:
parent
69ba22fc9b
commit
c0dfaed4d0
|
@ -12,8 +12,8 @@ export class AgileCrmApi implements ICredentialType {
|
|||
name: 'email',
|
||||
type: 'string' as NodePropertyTypes,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
displayName: 'API Key',
|
||||
name: 'apiKey',
|
||||
type: 'string' as NodePropertyTypes,
|
||||
|
@ -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.',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ export async function agileCrmApiRequest(this: IHookFunctions | IExecuteFunction
|
|||
}
|
||||
|
||||
export async function agileCrmApiRequestUpdate(this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method = 'PUT', endpoint?: string, body: any = {}, query: IDataObject = {}, uri?: string): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
|
||||
const credentials = this.getCredentials('agileCrmApi');
|
||||
const baseUri = `https://${credentials!.subdomain}.agilecrm.com/dev/`;
|
||||
const options: OptionsWithUri = {
|
||||
|
|
Loading…
Reference in a new issue