mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
Added validation for services and prefix to response variable
This commit is contained in:
parent
f8b090b9f6
commit
56a6cb1414
|
@ -339,7 +339,7 @@ export class Aws implements ICredentialType {
|
||||||
region = parsed.region;
|
region = parsed.region;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!requestOptions.baseURL && !requestOptions.url) {
|
if (!requestOptions.baseURL && !requestOptions.url && service) {
|
||||||
let endpointString: string;
|
let endpointString: string;
|
||||||
if (service === 'lambda' && credentials.lambdaEndpoint) {
|
if (service === 'lambda' && credentials.lambdaEndpoint) {
|
||||||
endpointString = credentials.lambdaEndpoint;
|
endpointString = credentials.lambdaEndpoint;
|
||||||
|
@ -353,9 +353,6 @@ export class Aws implements ICredentialType {
|
||||||
endpointString = credentials.sesEndpoint;
|
endpointString = credentials.sesEndpoint;
|
||||||
} else if (service === 'rekognition' && credentials.rekognitionEndpoint) {
|
} else if (service === 'rekognition' && credentials.rekognitionEndpoint) {
|
||||||
endpointString = credentials.rekognitionEndpoint;
|
endpointString = credentials.rekognitionEndpoint;
|
||||||
} else if (service === 'sqs' && credentials.sqsEndpoint) {
|
|
||||||
//ToDo: should we remove the duplicate?
|
|
||||||
endpointString = credentials.sqsEndpoint;
|
|
||||||
} else if (service) {
|
} else if (service) {
|
||||||
endpointString = `https://${service}.${region}.amazonaws.com`;
|
endpointString = `https://${service}.${region}.amazonaws.com`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { sign, type Request } from 'aws4';
|
import { sign, type Request } from 'aws4';
|
||||||
import type { IHttpRequestOptions } from 'n8n-workflow';
|
import type { IHttpRequestOptions } from 'n8n-workflow';
|
||||||
|
|
||||||
import { Aws, type AwsCredentialsType } from '../Aws.credentials';
|
import { Aws, type AwsCredentialsType } from '../Aws.credentials';
|
||||||
|
|
||||||
jest.mock('aws4', () => ({
|
jest.mock('aws4', () => ({
|
||||||
|
|
|
@ -30,7 +30,7 @@ export class AwsCognito implements INodeType {
|
||||||
outputs: [NodeConnectionType.Main],
|
outputs: [NodeConnectionType.Main],
|
||||||
hints: [
|
hints: [
|
||||||
{
|
{
|
||||||
message: 'Please select a parameter in the options to update the user',
|
message: 'Select a parameter to update this resource',
|
||||||
displayCondition:
|
displayCondition:
|
||||||
'={{$parameter["resource"] === "user" && $parameter["operation"] === "update" && Object.keys($parameter["additionalOptions"]).length === 0}}',
|
'={{$parameter["resource"] === "user" && $parameter["operation"] === "update" && Object.keys($parameter["additionalOptions"]).length === 0}}',
|
||||||
whenToDisplay: 'always',
|
whenToDisplay: 'always',
|
||||||
|
@ -38,7 +38,7 @@ export class AwsCognito implements INodeType {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
message: 'Please select a parameter in the options to update the group',
|
message: 'Select a parameter to update this resource',
|
||||||
displayCondition:
|
displayCondition:
|
||||||
'={{$parameter["resource"] === "group" && $parameter["operation"] === "update" && Object.keys($parameter["options"]).length === 0}}',
|
'={{$parameter["resource"] === "group" && $parameter["operation"] === "update" && Object.keys($parameter["options"]).length === 0}}',
|
||||||
whenToDisplay: 'always',
|
whenToDisplay: 'always',
|
||||||
|
|
|
@ -562,7 +562,7 @@ export function mapUserAttributes(userAttributes: Array<{ Name: string; Value: s
|
||||||
export async function simplifyData(
|
export async function simplifyData(
|
||||||
this: IExecuteSingleFunctions,
|
this: IExecuteSingleFunctions,
|
||||||
items: INodeExecutionData[],
|
items: INodeExecutionData[],
|
||||||
response: IN8nHttpFullResponse,
|
_response: IN8nHttpFullResponse,
|
||||||
): Promise<INodeExecutionData[]> {
|
): Promise<INodeExecutionData[]> {
|
||||||
const simple = this.getNodeParameter('simple') as boolean;
|
const simple = this.getNodeParameter('simple') as boolean;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue