Skip to content

Commit

Permalink
Zeta Bid Adapter: update to endpoint (#6697)
Browse files Browse the repository at this point in the history
* adapter updates

* remove testing changes

* modify endpoint path

* address testing issues
  • Loading branch information
mwehr-zeta authored and idettman committed May 21, 2021
1 parent ddf0f53 commit 91bce6c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions modules/zetaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,13 @@ export const spec = {
badv: params.badv,
bapp: params.bapp,
source: params.source ? params.source : {},
ext: {
definerId: params.definerId
}
ext: params.ext ? params.ext : {}
};

payload.device.ua = navigator.userAgent;
payload.site.page = bidderRequest.refererInfo.referer;
payload.site.mobile = /(ios|ipod|ipad|iphone|android)/i.test(navigator.userAgent) ? 1 : 0;
payload.ext.definerId = params.definerId;

if (params.test) {
payload.test = params.test;
Expand All @@ -113,9 +112,10 @@ export const spec = {
}
};
}
const postUrl = params.definerId !== '0' ? ENDPOINT_URL.concat('/', params.definerId) : ENDPOINT_URL;
return {
method: 'POST',
url: ENDPOINT_URL,
url: postUrl,
data: JSON.stringify(payload),
};
},
Expand Down
4 changes: 2 additions & 2 deletions modules/zetaBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Module that connects to Zeta's demand sources
device: {
ip: '111.222.33.44',
geo: {
country: "USA"
country: 'USA'
}
},
definerId: 1,
definerId: '0',
test: 1
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/zetaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Zeta Bid Adapter', function() {
}
},
refererInfo: {
referer: 'zetaglobal.com'
referer: 'testprebid.com'
},
params: {
placement: 12345,
Expand All @@ -24,7 +24,7 @@ describe('Zeta Bid Adapter', function() {
country: 'USA'
}
},
definerId: 1,
definerId: '0',
test: 1
}
}];
Expand Down

0 comments on commit 91bce6c

Please sign in to comment.