mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Fix typo
This commit is contained in:
@@ -397,12 +397,12 @@ export class Rocketchat implements INodeType {
|
|||||||
|
|
||||||
async executeSingle(this: IExecuteSingleFunctions): Promise<INodeExecutionData> {
|
async executeSingle(this: IExecuteSingleFunctions): Promise<INodeExecutionData> {
|
||||||
const resource = this.getNodeParameter('resource') as string;
|
const resource = this.getNodeParameter('resource') as string;
|
||||||
const opeation = this.getNodeParameter('operation') as string;
|
const operation = this.getNodeParameter('operation') as string;
|
||||||
let response;
|
let response;
|
||||||
|
|
||||||
if (resource === 'chat') {
|
if (resource === 'chat') {
|
||||||
//https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage
|
//https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage
|
||||||
if (opeation === 'postMessage') {
|
if (operation === 'postMessage') {
|
||||||
const channel = this.getNodeParameter('channel') as string;
|
const channel = this.getNodeParameter('channel') as string;
|
||||||
const text = this.getNodeParameter('text') as string;
|
const text = this.getNodeParameter('text') as string;
|
||||||
const options = this.getNodeParameter('options') as IDataObject;
|
const options = this.getNodeParameter('options') as IDataObject;
|
||||||
@@ -489,11 +489,7 @@ export class Rocketchat implements INodeType {
|
|||||||
body.attachments = validateJSON(this.getNodeParameter('attachmentsJson') as string);
|
body.attachments = validateJSON(this.getNodeParameter('attachmentsJson') as string);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
response = await rocketchatApiRequest.call(this, '/chat', 'POST', 'postMessage', body);
|
||||||
response = await rocketchatApiRequest.call(this, '/chat', 'POST', 'postMessage', body);
|
|
||||||
} catch (err) {
|
|
||||||
throw new Error(`Rocketchat Error: ${err}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user