mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
Changed subdomain for domain
This commit is contained in:
@@ -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'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user