diff --git a/packages/nodes-base/credentials/RocketchatApi.credentials.ts b/packages/nodes-base/credentials/RocketchatApi.credentials.ts index 0231d5a72b..6e1f453649 100644 --- a/packages/nodes-base/credentials/RocketchatApi.credentials.ts +++ b/packages/nodes-base/credentials/RocketchatApi.credentials.ts @@ -21,11 +21,10 @@ export class RocketchatApi implements ICredentialType { default: '', }, { - displayName: 'Sub Domain', - name: 'subdomain', + displayName: 'Domain', + name: 'domain', type: 'string' as NodePropertyTypes, default: '', - placeholder: 'n8n' }, ]; } diff --git a/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts b/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts index b058e67e6c..000d3ddb55 100644 --- a/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Rocketchat/GenericFunctions.ts @@ -13,16 +13,14 @@ export async function rocketchatApiRequest(this: IHookFunctions | IExecuteFuncti throw new Error('No credentials got returned!'); } - const headerWithAuthentication = Object.assign({}, headers, + const headerWithAuthentication = Object.assign({}, headers, { 'X-Auth-Token': credentials.authKey, 'X-User-Id': credentials.userId }); - const endpoint = 'rocket.chat/api/v1'; - const options: OptionsWithUri = { headers: headerWithAuthentication, method, body, - uri: `https://${credentials.subdomain}.${endpoint}${resource}.${operation}`, + uri: `${credentials.endpoint}${resource}.${operation}`, json: true };