mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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,
|
type: 'string' as NodePropertyTypes,
|
||||||
default: '',
|
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,
|
method,
|
||||||
qs,
|
qs,
|
||||||
form: body,
|
form: body,
|
||||||
uri: uri ||`http://api.jotform.com${resource}`,
|
uri: uri || `https://${credentials.apiDomain || 'api.jotform.com'}${resource}`,
|
||||||
json: true
|
json: true
|
||||||
};
|
};
|
||||||
if (!Object.keys(body).length) {
|
if (!Object.keys(body).length) {
|
||||||
|
|
Loading…
Reference in a new issue