mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
⚡ Fix typo
This commit is contained in:
parent
e09a4b91ad
commit
eea5f3775f
|
@ -397,12 +397,12 @@ export class Rocketchat implements INodeType {
|
|||
|
||||
async executeSingle(this: IExecuteSingleFunctions): Promise<INodeExecutionData> {
|
||||
const resource = this.getNodeParameter('resource') as string;
|
||||
const opeation = this.getNodeParameter('operation') as string;
|
||||
const operation = this.getNodeParameter('operation') as string;
|
||||
let response;
|
||||
|
||||
if (resource === 'chat') {
|
||||
//https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage
|
||||
if (opeation === 'postMessage') {
|
||||
if (operation === 'postMessage') {
|
||||
const channel = this.getNodeParameter('channel') as string;
|
||||
const text = this.getNodeParameter('text') as string;
|
||||
const options = this.getNodeParameter('options') as IDataObject;
|
||||
|
@ -489,11 +489,7 @@ export class Rocketchat implements INodeType {
|
|||
body.attachments = validateJSON(this.getNodeParameter('attachmentsJson') as string);
|
||||
}
|
||||
|
||||
try {
|
||||
response = await rocketchatApiRequest.call(this, '/chat', 'POST', 'postMessage', body);
|
||||
} catch (err) {
|
||||
throw new Error(`Rocketchat Error: ${err}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue