mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fixed tabs issue
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user