Skip to content

Commit

Permalink
fix gdpr consent required (prebid#2734)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsalis authored and AlessandroDG committed Sep 13, 2018
1 parent 8fde604 commit d04a7cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions modules/beachfrontBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ function createVideoRequestData(bid, bidderRequest) {
};

if (bidderRequest && bidderRequest.gdprConsent) {
let { consentRequired, consentString } = bidderRequest.gdprConsent;
payload.regs.ext = { gdpr: consentRequired ? 1 : 0 };
let { gdprApplies, consentString } = bidderRequest.gdprConsent;
payload.regs.ext = { gdpr: gdprApplies ? 1 : 0 };
payload.user.ext = { consent: consentString };
}

Expand Down Expand Up @@ -283,8 +283,8 @@ function createBannerRequestData(bids, bidderRequest) {
};

if (bidderRequest && bidderRequest.gdprConsent) {
let { consentRequired, consentString } = bidderRequest.gdprConsent;
payload.gdpr = consentRequired ? 1 : 0;
let { gdprApplies, consentString } = bidderRequest.gdprConsent;
payload.gdpr = gdprApplies ? 1 : 0;
payload.gdprConsent = consentString;
}

Expand Down
4 changes: 2 additions & 2 deletions test/spec/modules/beachfrontBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ describe('BeachfrontAdapter', () => {
const consentString = 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A==';
const bidderRequest = {
gdprConsent: {
consentRequired: true,
gdprApplies: true,
consentString
}
};
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('BeachfrontAdapter', () => {
const consentString = 'BOJ8RZsOJ8RZsABAB8AAAAAZ+A==';
const bidderRequest = {
gdprConsent: {
consentRequired: true,
gdprApplies: true,
consentString
}
};
Expand Down

0 comments on commit d04a7cb

Please sign in to comment.