fixed tabs issue

This commit is contained in:
Ricardo Espinoza
2019-11-11 00:00:24 -05:00
parent e9613944db
commit 11826d6a4e
2 changed files with 347 additions and 351 deletions

View File

@@ -1,5 +1,4 @@
import { OptionsWithUri } from 'request';
import {
IExecuteFunctions,
IHookFunctions,
@@ -8,17 +7,16 @@ import {
} from 'n8n-core';
export async function rocketchatApiRequest(this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, resource: string, method: string, operation: string, body: any = {}, headers?: object): Promise<any> { // tslint:disable-line:no-any
const credentials = this.getCredentials('rocketchatApi');
if (credentials === undefined) {
throw new Error('No credentials got returned!');
throw new Error('No credentials got returned!');
}
const headerWithAuthentication = Object.assign({}, headers,
{ 'X-Auth-Token': credentials.authKey, 'X-User-Id': credentials.userId });
const headerWithAuthentication = Object.assign({}, headers,
{ 'X-Auth-Token': credentials.authKey, 'X-User-Id': credentials.userId });
const endpoint = 'rocket.chat/api/v1';
const endpoint = 'rocket.chat/api/v1';
const options: OptionsWithUri = {
headers: headerWithAuthentication,