Skip to content

Commit

Permalink
test endpoint was added (prebid#8286)
Browse files Browse the repository at this point in the history
  • Loading branch information
mifanich authored Apr 15, 2022
1 parent 5f9e40d commit 998e934
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/nextMillenniumBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { isStr, _each, getBidIdParameter } from '../src/utils.js';
import { isStr, _each, parseUrl, getWindowTop, getBidIdParameter } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js';

const BIDDER_CODE = 'nextMillennium';
const ENDPOINT = 'https://pbs.nextmillmedia.com/openrtb2/auction';
const TEST_ENDPOINT = 'https://test.pbs.nextmillmedia.com/openrtb2/auction';
const SYNC_ENDPOINT = 'https://statics.nextmillmedia.com/load-cookie.html?v=4';
const TIME_TO_LIVE = 360;

Expand Down Expand Up @@ -61,9 +62,12 @@ export const spec = {
}
}

const urlParameters = parseUrl(getWindowTop().location.href).search;
const isTest = urlParameters['pbs'] && urlParameters['pbs'] === 'test';

requests.push({
method: 'POST',
url: ENDPOINT,
url: isTest ? TEST_ENDPOINT : ENDPOINT,
data: JSON.stringify(postBody),
options: {
contentType: 'application/json',
Expand Down

0 comments on commit 998e934

Please sign in to comment.