Skip to content

Commit

Permalink
Conversant Bid Adapter: handle paapi data in the response
Browse files Browse the repository at this point in the history
  • Loading branch information
johwier committed Jun 13, 2024
1 parent 69d7906 commit 7c06ec6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions modules/conversantBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const converter = ortbConverter({
},
response(buildResponse, bidResponses, ortbResponse, context) {
const response = buildResponse(bidResponses, ortbResponse, context);
return response.bids;
return response;
},
overrides: {
imp: {
Expand Down Expand Up @@ -176,7 +176,8 @@ export const spec = {
* @return {Bid[]} An array of bids which were nested inside the server.
*/
interpretResponse: function(serverResponse, bidRequest) {
return converter.fromORTB({request: bidRequest.data, response: serverResponse.body});
const ortbBids = converter.fromORTB({request: bidRequest.data, response: serverResponse.body});
return ortbBids;
},

/**
Expand Down
3 changes: 2 additions & 1 deletion test/spec/modules/conversantBidAdapter_spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {expect} from 'chai';
import {spec, storage} from 'modules/conversantBidAdapter.js';
import * as utils from 'src/utils.js';
import {deepSetValue} from 'src/utils.js';
import {createEidsArray} from 'modules/userId/eids.js';
import {deepAccess} from 'src/utils';
// load modules that register ORTB processors
Expand Down Expand Up @@ -465,7 +466,7 @@ describe('Conversant adapter tests', function() {

before(() => {
request = spec.buildRequests(bidRequests, {});
response = spec.interpretResponse(bidResponses, request);
response = spec.interpretResponse(bidResponses, request).bids;
});

it('Banner', function() {
Expand Down

0 comments on commit 7c06ec6

Please sign in to comment.