UI finished

This commit is contained in:
Ricardo Espinoza
2019-11-07 13:07:29 -05:00
parent e014b63748
commit 2292cc018c
3 changed files with 219 additions and 33 deletions

View File

@@ -19,9 +19,9 @@ export async function freshdeskApiRequest(this: IHookFunctions | IExecuteFunctio
throw new Error('No credentials got returned!');
}
const userpass = `${credentials.username}:${credentials.password}`
const apiKey = `${credentials.apiKey}:X`;
const headerWithAuthentication = Object.assign({}, headers, { Authorization: `Basic ${Buffer.from(userpass).toString(BINARY_ENCODING)}` });
const headerWithAuthentication = Object.assign({}, headers, { Authorization: `${Buffer.from(apiKey).toString(BINARY_ENCODING)}` });
const endpoint = 'freshdesk.com/api/v2/';
@@ -34,7 +34,7 @@ export async function freshdeskApiRequest(this: IHookFunctions | IExecuteFunctio
};
if (_.isEmpty(options.body)) {
delete options.body
delete options.body;
}
try {