mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Make it possible to use JotForm accounts from Europe
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user