Skip to content

Commit

Permalink
refactor: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauravudia committed Jan 3, 2024
1 parent de15516 commit 215e6b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/cdk/v2/destinations/the_trade_desk/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const getSignatureHeader = (request, secretKey) => {
return base;
};

const responseBuilder = (items, Config) => {
const { advertiserId, dataServer } = Config;
const responseBuilder = (items, config) => {
const { advertiserId, dataServer } = config;

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

Expand Down Expand Up @@ -70,12 +70,12 @@ const splitItemsBasedOnMaxSizeInBytes = (items, maxSize) => {
return batches;
};

const batchResponseBuilder = (items, Config) => {
const batchResponseBuilder = (items, config) => {
const response = [];
const itemsChunks = splitItemsBasedOnMaxSizeInBytes(items, MAX_REQUEST_SIZE_IN_BYTES);

itemsChunks.forEach((chunk) => {
response.push(responseBuilder(chunk, Config));
response.push(responseBuilder(chunk, config));
});

return response;
Expand Down
1 change: 0 additions & 1 deletion src/v0/destinations/the_trade_desk/networkHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const tags = require('../../util/tags');
const { JSON_MIME_TYPE } = require('../../util/constant');

const proxyRequest = async (request) => {
console.log('request', JSON.stringify(request));
const { endpoint, data, method, params, headers, config } = prepareProxyRequest(request);

if (!config?.advertiserSecretKey) {
Expand Down

0 comments on commit 215e6b8

Please sign in to comment.