mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ Make it possible to use JotForm accounts from Europe
This commit is contained in:
parent
764172d46f
commit
ff67e991b2
|
@ -13,5 +13,22 @@ export class JotFormApi implements ICredentialType {
|
|||
type: 'string' as NodePropertyTypes,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'API Domain',
|
||||
name: 'apiDomain',
|
||||
type: 'options' as NodePropertyTypes,
|
||||
options: [
|
||||
{
|
||||
name: 'api.jotform.com',
|
||||
value: 'api.jotform.com',
|
||||
},
|
||||
{
|
||||
name: 'eu-api.jotform.com',
|
||||
value: 'eu-api.jotform.com',
|
||||
},
|
||||
],
|
||||
default: 'api.jotform.com',
|
||||
description: 'The API domain to use. Use "eu-api.jotform.com" if your account is in based in Europe.',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ export async function jotformApiRequest(this: IHookFunctions | IExecuteFunctions
|
|||
method,
|
||||
qs,
|
||||
form: body,
|
||||
uri: uri ||`http://api.jotform.com${resource}`,
|
||||
uri: uri || `https://${credentials.apiDomain || 'api.jotform.com'}${resource}`,
|
||||
json: true
|
||||
};
|
||||
if (!Object.keys(body).length) {
|
||||
|
|
Loading…
Reference in a new issue