Skip to content

Commit

Permalink
Kargo Adapter: fix extensible error (prebid#3998)
Browse files Browse the repository at this point in the history
* Add microadBidAdapter

* Remove unnecessary encodeURIComponent from microadBidAdapter

* Submit Advangelists Prebid Adapter

* Submit Advangelists Prebid Adapter 1.1

* Correct procudtion endpoint for prebid

* analytics update with wrapper name

* add '_sessionId' to the object literal for spec

* removed error merge

* replaced obj property with sibling variable

* updated test for changes to sessionId
  • Loading branch information
Isaac Dettman authored and Alex committed Aug 1, 2019
1 parent e326fc9 commit 03a03d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions modules/kargoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const BIDDER_CODE = 'kargo';
const HOST = 'https://krk.kargo.com';
const SYNC = 'https://crb.kargo.com/api/v1/initsyncrnd/{UUID}?seed={SEED}&idx={INDEX}';
const SYNC_COUNT = 5;

let sessionId;

export const spec = {
code: BIDDER_CODE,
isBidRequestValid: function(bid) {
Expand Down Expand Up @@ -193,10 +196,10 @@ export const spec = {
},

_getSessionId() {
if (!spec._sessionId) {
spec._sessionId = spec._generateRandomUuid();
if (!sessionId) {
sessionId = spec._generateRandomUuid();
}
return spec._sessionId;
return sessionId;
},

_generateRandomUuid() {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/kargoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe('kargo adapter tests', function () {
}

function getSessionId() {
return spec._sessionId;
return spec._getSessionId();
}

function getExpectedKrakenParams(excludeUserIds, excludeKrux, expectedRawCRB, expectedRawCRBCookie) {
Expand Down

0 comments on commit 03a03d1

Please sign in to comment.