Small fix on AWS SES-Node (#1049)

This commit is contained in:
Ricardo Espinoza 2020-10-13 09:05:09 -04:00 committed by GitHub
parent d3a52297f2
commit 1e275b188d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -664,7 +664,7 @@ export class AwsSes implements INodeType {
}
}
responseData = await awsApiRequestSOAP.call(this, 'email', 'POST', '/?Action=send&' + params.join('&'));
responseData = await awsApiRequestSOAP.call(this, 'email', 'POST', '/?Action=SendEmail&' + params.join('&'));
}
if (operation === 'sendTemplate') {
@ -726,11 +726,13 @@ export class AwsSes implements INodeType {
if (templateDataUi) {
const templateDataValues = (templateDataUi as IDataObject).templateDataValues as IDataObject[];
const templateData: IDataObject = {};
for (const key of Object.keys(templateDataValues)) {
//@ts-ignore
templateData[key]= templateDataValues[key];
if (templateDataValues !== undefined) {
for (const key of Object.keys(templateDataValues)) {
//@ts-ignore
templateData[key]= templateDataValues[key];
}
params.push(`TemplateData=${JSON.stringify(templateData)}`);
}
params.push(`TemplateData=${JSON.stringify(templateData)}`);
}
responseData = await awsApiRequestSOAP.call(this, 'email', 'POST', '/?Action=SendTemplatedEmail&' + params.join('&'));