Skip to content

Commit

Permalink
Get site content from bidrequest instead of config
Browse files Browse the repository at this point in the history
  • Loading branch information
symplorpro authored Dec 17, 2024
1 parent 65acb7a commit 75ef4a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/rediadsBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ortbConverter } from '../libraries/ortbConverter/converter.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { deepSetValue, logWarn, logError } from '../src/utils.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
import { config } from '../src/config.js';

const BIDDER_CODE = 'rediads';
const ENDPOINT_URL = 'https://bidding.rediads.com/openrtb2/auction';
Expand Down Expand Up @@ -56,6 +55,7 @@ export const spec = {
},
buildRequests(bidRequests, bidderRequest) {
const params = bidRequests[0]?.params || {};
const siteContent = bidRequests[0]?.site?.content || null;
let data = {};
let FINAL_ENDPOINT_URL = params.endpoint || ENDPOINT_URL
try {
Expand All @@ -66,9 +66,8 @@ export const spec = {
if (stagingEnvRequested) {
FINAL_ENDPOINT_URL = STAGING_ENDPOINT_URL;
}

deepSetValue(data, 'ext.rediads.params', params);
deepSetValue(data, 'site.content', config.getConfig('content'));
deepSetValue(data, 'site.content', siteContent);

if (testBidsRequested) {
deepSetValue(data, 'test', 1);
Expand Down

0 comments on commit 75ef4a3

Please sign in to comment.