Skip to content

Commit

Permalink
feat:remove yeahmobi code change
Browse files Browse the repository at this point in the history
  • Loading branch information
adam authored and adam committed Jan 2, 2024
1 parent 1be4737 commit 1a4f330
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions adapters/yeahmobi/yeahmobi.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,32 +154,16 @@ func (a *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest

bidResponse := adapters.NewBidderResponseWithBidsCapacity(1)

var errs []error
for _, sb := range bidResp.SeatBid {
for i := range sb.Bid {
bid := sb.Bid[i]
var mediaType = getBidType(bid.ImpID, internalRequest.Imp)
typedBid := &adapters.TypedBid{
Bid: &bid,
BidType: mediaType,
BidVideo: &openrtb_ext.ExtBidPrebidVideo{},
}
if bid.Ext != nil {
var bidExt *yeahmobiBidExt
err := json.Unmarshal(bid.Ext, &bidExt)
if err != nil {
errs = append(errs, err)
} else if bidExt != nil {
if bidExt.VideoCreativeInfo != nil && bidExt.VideoCreativeInfo.Duration != nil {
typedBid.BidVideo.Duration = *bidExt.VideoCreativeInfo.Duration
}
}
}

bidResponse.Bids = append(bidResponse.Bids, typedBid)
var mediaType = getBidType(sb.Bid[i].ImpID, internalRequest.Imp)
bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
Bid: &sb.Bid[i],
BidType: mediaType,
})
}
}
return bidResponse, errs
return bidResponse, nil

}

Expand Down

0 comments on commit 1a4f330

Please sign in to comment.