Skip to content
This repository was archived by the owner on Dec 22, 2022. It is now read-only.

Commit fe842d3

Browse files
authored
Consumable: Correct bid type, should always be "banner". (prebid#1359)
1 parent 4ef92e1 commit fe842d3

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

adapters/consumable/consumable.go

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,11 @@ func (a *ConsumableAdapter) MakeBids(
268268
//bid.referrer = utils.getTopWindowUrl();
269269

270270
bidderResponse.Bids = append(bidderResponse.Bids, &adapters.TypedBid{
271-
Bid: &bid,
272-
BidType: getMediaTypeForImp(getImp(bid.ImpID, internalRequest.Imp)),
271+
Bid: &bid,
272+
// Consumable units are always HTML, never VAST.
273+
// From Prebid's point of view, this means that Consumable units
274+
// are always "banners".
275+
BidType: openrtb_ext.BidTypeBanner,
273276
})
274277
}
275278
}
@@ -303,16 +306,6 @@ func extractExtensions(impression openrtb.Imp) (*adapters.ExtImpBidder, *openrtb
303306
return &bidderExt, &consumableExt, nil
304307
}
305308

306-
func getMediaTypeForImp(imp *openrtb.Imp) openrtb_ext.BidType {
307-
// TODO: Whatever logic we need here possibly as follows - may always be Video when we bid
308-
if imp.Banner != nil {
309-
return openrtb_ext.BidTypeBanner
310-
} else if imp.Video != nil {
311-
return openrtb_ext.BidTypeVideo
312-
}
313-
return openrtb_ext.BidTypeVideo
314-
}
315-
316309
func testConsumableBidder(testClock instant, endpoint string) *ConsumableAdapter {
317310
return &ConsumableAdapter{testClock, endpoint}
318311
}

0 commit comments

Comments
 (0)