Skip to content

Commit

Permalink
Chore: Fix SonarQube Quality Gate
Browse files Browse the repository at this point in the history
  • Loading branch information
NghiaDTr committed Nov 15, 2024
1 parent 0e4a7c1 commit ab77925
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion processor/src/commercetools/auth.commercetools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import fetch from 'node-fetch';
export const getAccessToken = async (): Promise<any> => {
const config = readConfiguration();

const credentials = btoa(config.commerceTools.clientId + ':' + config.commerceTools.clientSecret);

const headers = {
Authorization: `Basic ${btoa(`${config.commerceTools.clientId}:${config.commerceTools.clientSecret}`)}`,
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
};

Expand Down

0 comments on commit ab77925

Please sign in to comment.