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