diff --git a/modules/proxistoreBidAdapter.js b/modules/proxistoreBidAdapter.js index a399a906402..6facf5d1480 100644 --- a/modules/proxistoreBidAdapter.js +++ b/modules/proxistoreBidAdapter.js @@ -9,7 +9,6 @@ function _mapSizes(sizes) { function _createServerRequest(bidRequests, bidderRequest) { const payload = { - bidId: bidRequests.map(req => req.bidId), auctionId: bidRequests[0].auctionId, transactionId: bidRequests[0].transactionId, sizes: _mapSizes(bidRequests.map(x => x.sizes)), @@ -20,6 +19,9 @@ function _createServerRequest(bidRequests, bidderRequest) { } }; + const bidIds = bidRequests.map(req => req.bidId); + bidIds.length === 1 ? payload.bidId = bidIds[0] : payload.bidIds = bidIds; + const options = { contentType: 'application/json', withCredentials: true diff --git a/test/spec/modules/proxistoreBidAdapter_spec.js b/test/spec/modules/proxistoreBidAdapter_spec.js index 4fd7d97ae99..579ef5fdb3b 100644 --- a/test/spec/modules/proxistoreBidAdapter_spec.js +++ b/test/spec/modules/proxistoreBidAdapter_spec.js @@ -50,10 +50,15 @@ describe('ProxistoreBidAdapter', function () { }); it('should have the value consentGiven to true bc we have 418 in the vendor list', function () { const data = JSON.parse(request.data); + expect(data.gdpr.consentString).equal(bidderRequest.gdprConsent.consentString); expect(data.gdpr.applies).to.be.true; expect(data.gdpr.consentGiven).to.be.true; }); + it('should have a property bidId if there is only one bid', function () { + const data = JSON.parse(request.data); + expect(data.hasOwnProperty('bidId')).to.be.true; + }) }); describe('interpretResponse', function () {