Skip to content

Commit

Permalink
Colossus Bid Adapter: fix validator (prebid#7926)
Browse files Browse the repository at this point in the history
* add video&native traffic colossus ssp

* Native obj validation

* Native obj validation #2

* Added size field in requests

* fixed test

* fix merge conflicts

* move to 3.0

* move to 3.0

* fix IE11 new URL issue

* fix IE11 new URL issue

* fix IE11 new URL issue

* https for 3.0

* add https test

* add ccp and schain features

* fix test

* sync with upstream, fix conflicts

* Update colossussspBidAdapter.js

remove commented code

* Update colossussspBidAdapter.js

lint fix

* identity extensions

* identity extensions

* fix

* fix

* fix

* fix

* fix

* add tests for user ids

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* add gdpr support

* add gdpr support

* id5id support

* Update colossussspBidAdapter.js

add bidfloor parameter

* Update colossussspBidAdapter.js

check bidfloor

* Update colossussspBidAdapter.js

* Update colossussspBidAdapter.js

* Update colossussspBidAdapter.js

* Update colossussspBidAdapter_spec.js

* use floor module

* Revert "use floor module"

This reverts commit f0c5c24.

* use floor module

* update to 5v

* fix

* add uid2 and bidFloor support

* fix

* add pbadslot support

* fix conflicts

* add onBidWon

* refactor

* add test for onBidWon()

* fix

* add group_id

* Trigger circleci

* fix

Co-authored-by: Vladislav Isaiko <vladis@smartyads.com>
Co-authored-by: Aiholkin <artem.iholkin@smartyads.com>
Co-authored-by: Mykhailo Yaremchuk <m.yaremchuk@smartyads.com>
  • Loading branch information
4 people committed Jan 10, 2022
1 parent c9dc39c commit de3b797
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/colossussspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ export const spec = {
* @return boolean True if this is a valid bid, and false otherwise.
*/
isBidRequestValid: (bid) => {
return Boolean(bid.bidId && bid.params && !isNaN(bid.params.placement_id));
const validPlacamentId = bid.params && !isNaN(bid.params.placement_id);
const validGroupId = bid.params && !isNaN(bid.params.group_id);

return Boolean(bid.bidId && (validPlacamentId || validGroupId));
},

/**
Expand Down
1 change: 1 addition & 0 deletions test/spec/modules/colossussspBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ describe('ColossussspAdapter', function () {
});
it('Should return false when placement_id is not a number', function () {
bid.params.placement_id = 'aaa';
delete bid.params.group_id;
expect(spec.isBidRequestValid(bid)).to.be.false;
});
});
Expand Down

0 comments on commit de3b797

Please sign in to comment.