Skip to content

Commit

Permalink
Pbs bid adapter: constants import styling for webpack v5 upgrade (#6723)
Browse files Browse the repository at this point in the history
* mapping spotx dealid to bid object

* using proper syntax to import default json module

* kick off tests

* es lint fix

Co-authored-by: Danny Khatib <dk2020@Dannys-MacBook-Pro.local>
Co-authored-by: Chris Huie <3444727+ChrisHuie@users.noreply.github.com>
  • Loading branch information
3 people authored and idettman committed May 21, 2021
1 parent 8141214 commit de6ddca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Adapter from '../../src/adapter.js';
import { createBid } from '../../src/bidfactory.js';
import * as utils from '../../src/utils.js';
import { STATUS, S2S, EVENTS } from '../../src/constants.json';
import CONSTANTS from '../../src/constants.json';
import adapterManager from '../../src/adapterManager.js';
import { config } from '../../src/config.js';
import { VIDEO, NATIVE } from '../../src/mediaTypes.js';
Expand All @@ -16,7 +16,7 @@ import { getPrebidInternal } from '../../src/utils.js';

const getConfig = config.getConfig;

const TYPE = S2S.SRC;
const TYPE = CONSTANTS.S2S.SRC;
let _syncCount = 0;
const DEFAULT_S2S_TTL = 60;
const DEFAULT_S2S_CURRENCY = 'USD';
Expand Down Expand Up @@ -842,7 +842,7 @@ const OPEN_RTB_PROTOCOL = {
}

const cpm = bid.price;
const status = cpm !== 0 ? STATUS.GOOD : STATUS.NO_BID;
const status = cpm !== 0 ? CONSTANTS.STATUS.GOOD : CONSTANTS.STATUS.NO_BID;
let bidObject = createBid(status, bidRequest || {
bidder: seatbid.seat,
src: TYPE
Expand Down Expand Up @@ -1101,7 +1101,7 @@ export function PrebidServer() {
}
});

bidderRequests.forEach(bidderRequest => events.emit(EVENTS.BIDDER_DONE, bidderRequest));
bidderRequests.forEach(bidderRequest => events.emit(CONSTANTS.EVENTS.BIDDER_DONE, bidderRequest));
} catch (error) {
utils.logError(error);
}
Expand All @@ -1115,7 +1115,7 @@ export function PrebidServer() {
}

// Listen for bid won to call wurl
events.on(EVENTS.BID_WON, bidWonHandler);
events.on(CONSTANTS.EVENTS.BID_WON, bidWonHandler);

return Object.assign(this, {
callBids: baseAdapter.callBids,
Expand Down

0 comments on commit de6ddca

Please sign in to comment.