Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/services/busApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ const tcCoreLibAuth = require('tc-core-library-js').auth;

const m2m = tcCoreLibAuth.m2m(config);

let client = null;

/**
* Get Http client to bus api
* @return {Object} Http Client to bus api
*/
async function getClient() {
if (client) return client;
let client = null;
const apiBusUrl = config.get('busApiUrl');
try {
const token = await m2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET);
Expand Down