Skip to content

Commit 619da58

Browse files
removed redundant endpointId
1 parent a2d5712 commit 619da58

2 files changed

Lines changed: 3 additions & 60 deletions

File tree

modules/e_volutionBidAdapter.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,16 @@ function isBidResponseValid(bid) {
2727
function getPlacementReqData(bid) {
2828
const { params, bidId, mediaTypes, transactionId, userIdAsEids } = bid;
2929
const schain = bid.schain || {};
30-
const { placementId, endpointId } = params;
30+
const { placementId } = params;
3131
const bidfloor = getBidFloor(bid);
3232

3333
const placement = {
34+
placementId,
3435
bidId,
3536
schain,
3637
bidfloor
3738
};
3839

39-
if (placementId) {
40-
placement.placementId = placementId;
41-
placement.type = 'publisher';
42-
} else if (endpointId) {
43-
placement.endpointId = endpointId;
44-
placement.type = 'network';
45-
}
46-
4740
if (mediaTypes && mediaTypes[BANNER]) {
4841
placement.adFormat = BANNER;
4942
placement.sizes = mediaTypes[BANNER].sizes;
@@ -102,7 +95,7 @@ export const spec = {
10295

10396
isBidRequestValid: (bid = {}) => {
10497
const { params, bidId, mediaTypes } = bid;
105-
let valid = Boolean(bidId && params && (params.placementId || params.endpointId));
98+
let valid = Boolean(bidId && params && params.placementId);
10699

107100
if (mediaTypes && mediaTypes[BANNER]) {
108101
valid = valid && Boolean(mediaTypes[BANNER] && mediaTypes[BANNER].sizes);

test/spec/modules/e_volutionBidAdapter_spec.js

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -156,56 +156,6 @@ describe('EvolutionTechBidAdapter', function () {
156156
expect(placement.bidId).to.be.a('string');
157157
expect(placement.schain).to.be.an('object');
158158
expect(placement.bidfloor).to.exist.and.to.equal(0);
159-
expect(placement.type).to.exist.and.to.equal('publisher');
160-
expect(placement.eids).to.exist.and.to.be.deep.equal(userIdAsEids);
161-
162-
if (placement.adFormat === BANNER) {
163-
expect(placement.sizes).to.be.an('array');
164-
}
165-
switch (placement.adFormat) {
166-
case BANNER:
167-
expect(placement.sizes).to.be.an('array');
168-
break;
169-
case VIDEO:
170-
expect(placement.playerSize).to.be.an('array');
171-
expect(placement.minduration).to.be.an('number');
172-
expect(placement.maxduration).to.be.an('number');
173-
break;
174-
case NATIVE:
175-
expect(placement.native).to.be.an('object');
176-
break;
177-
}
178-
}
179-
});
180-
181-
it('Returns valid endpoints', function () {
182-
const bids = [
183-
{
184-
bidId: getUniqueIdentifierStr(),
185-
bidder: bidder,
186-
mediaTypes: {
187-
[BANNER]: {
188-
sizes: [[300, 250]]
189-
}
190-
},
191-
params: {
192-
endpointId: 'testBanner',
193-
},
194-
userIdAsEids
195-
}
196-
];
197-
198-
let serverRequest = spec.buildRequests(bids, bidderRequest);
199-
200-
const { placements } = serverRequest.data;
201-
for (let i = 0, len = placements.length; i < len; i++) {
202-
const placement = placements[i];
203-
expect(placement.endpointId).to.be.oneOf(['testBanner', 'testVideo', 'testNative']);
204-
expect(placement.adFormat).to.be.oneOf([BANNER, VIDEO, NATIVE]);
205-
expect(placement.bidId).to.be.a('string');
206-
expect(placement.schain).to.be.an('object');
207-
expect(placement.bidfloor).to.exist.and.to.equal(0);
208-
expect(placement.type).to.exist.and.to.equal('network');
209159
expect(placement.eids).to.exist.and.to.be.deep.equal(userIdAsEids);
210160

211161
if (placement.adFormat === BANNER) {

0 commit comments

Comments
 (0)