mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
Credentials Subdomain
This commit is contained in:
parent
718929cb3b
commit
69ba22fc9b
|
@ -19,5 +19,11 @@ export class AgileCrmApi implements ICredentialType {
|
|||
type: 'string' as NodePropertyTypes,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Subdomain',
|
||||
name: 'subdomain',
|
||||
type: 'string' as NodePropertyTypes,
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -45,8 +45,9 @@ 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 baseUri = 'https://n8nio.agilecrm.com/dev/';
|
||||
|
||||
const credentials = this.getCredentials('agileCrmApi');
|
||||
const baseUri = `https://${credentials!.subdomain}.agilecrm.com/dev/`;
|
||||
const options: OptionsWithUri = {
|
||||
method,
|
||||
headers: {
|
||||
|
|
Loading…
Reference in a new issue