From a2ee137abbcaaa91320f3778e4f944e05d943f1d Mon Sep 17 00:00:00 2001 From: shrouti1507 Date: Fri, 22 Dec 2023 11:59:24 +0530 Subject: [PATCH] fix: small edit --- .../networkHandler.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js index 9dfb8244cb..c555b63924 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js @@ -18,13 +18,13 @@ const tags = require('../../util/tags'); * ref: https://developers.google.com/google-ads/api/rest/reference/rest/v15/CustomerMatchUserListMetadata */ -const createJob = async (endpoint, customerId, listId, headers, method, consentBlock) => { +const createJob = async (endpoint, headers, method, params) => { const jobCreatingUrl = `${endpoint}:create`; const customerMatchUserListMetadata = { - userList: `customers/${customerId}/userLists/${listId}`, + userList: `customers/${params.customerId}/userLists/${params.listId}`, }; - if (Object.keys(consentBlock).length > 0) { - customerMatchUserListMetadata.consent = consentBlock; + if (Object.keys(params.consent).length > 0) { + customerMatchUserListMetadata.consent = params.consent; } const jobCreatingRequest = { url: jobCreatingUrl, @@ -97,11 +97,11 @@ const runTheJob = async (endpoint, headers, method, jobId) => { const gaAudienceProxyRequest = async (request) => { const { body, method, params, endpoint } = request; const { headers } = request; - const { customerId, listId, consent } = params; + // const { customerId, listId, consent } = params; // step1: offlineUserDataJobs creation - const firstResponse = await createJob(endpoint, customerId, listId, headers, method, consent); + const firstResponse = await createJob(endpoint, headers, method, params); if (!firstResponse.success && !isHttpStatusSuccess(firstResponse?.response?.status)) { return firstResponse; }