Small changes to Sms77 node

This commit is contained in:
Jan Oberhauser
2020-05-02 13:09:16 +02:00
parent 58d0cda0bf
commit ae853ce602
5 changed files with 43 additions and 31 deletions

View File

@@ -19,7 +19,7 @@ export class Sms77 implements INodeType {
outputs: ['main'],
credentials: [
{
name: 'Sms77',
name: 'sms77Api',
required: true,
}
],
@@ -131,13 +131,13 @@ export class Sms77 implements INodeType {
throw new Error(`The operation "${operation}" is not known!`);
}
returnData.push({
requestId: await sms77ApiRequest.call(this, 'POST', 'sms', {}, {
from: this.getNodeParameter('from', i),
to: this.getNodeParameter('to', i),
text: this.getNodeParameter('message', i),
} as IDataObject)
const responseData = await sms77ApiRequest.call(this, 'POST', 'sms', {}, {
from: this.getNodeParameter('from', i),
to: this.getNodeParameter('to', i),
text: this.getNodeParameter('message', i),
});
returnData.push(responseData);
}
return [this.helpers.returnJsonArray(returnData)];
}