Skip to content

Commit

Permalink
refactor: remove secretKey from headers in utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauravudia committed Dec 21, 2023
1 parent f94f6d4 commit a135f83
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cdk/v2/destinations/the_trade_desk/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ function getSignatureHeader(request, secretKey) {
}

const responseBuilder = (items, Config) => {
const { advertiserID, advertiserSecretKey, dataServer } = Config;
const { advertiserID, dataServer } = Config;

Check warning on line 29 in src/cdk/v2/destinations/the_trade_desk/util.js

View check run for this annotation

Codecov / codecov/patch

src/cdk/v2/destinations/the_trade_desk/util.js#L29

Added line #L29 was not covered by tests

const payload = { DataProviderId: DATA_PROVIDER_ID, AdvertiserId: advertiserID, Items: items };

Check warning on line 31 in src/cdk/v2/destinations/the_trade_desk/util.js

View check run for this annotation

Codecov / codecov/patch

src/cdk/v2/destinations/the_trade_desk/util.js#L31

Added line #L31 was not covered by tests

const response = defaultRequestConfig();
response.endpoint = getFirstPartyEndpoint(dataServer);
response.method = defaultPostRequestConfig.requestMethod;
response.headers = {
secretKey: advertiserSecretKey,
};
response.body.JSON = removeUndefinedAndNullValues(payload);
return response;

Check warning on line 37 in src/cdk/v2/destinations/the_trade_desk/util.js

View check run for this annotation

Codecov / codecov/patch

src/cdk/v2/destinations/the_trade_desk/util.js#L33-L37

Added lines #L33 - L37 were not covered by tests
};
Expand Down

0 comments on commit a135f83

Please sign in to comment.