Skip to content

Commit

Permalink
fix: small edit
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Dec 22, 2023
1 parent fb8381a commit a2ee137
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Check warning on line 27 in src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js

View check run for this annotation

Codecov / codecov/patch

src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js#L27

Added line #L27 was not covered by tests
}
const jobCreatingRequest = {
url: jobCreatingUrl,
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a2ee137

Please sign in to comment.