Skip to content

Commit

Permalink
remove getBidType function
Browse files Browse the repository at this point in the history
  • Loading branch information
bansawbanchee committed Sep 19, 2024
1 parent dffa78c commit 835d0e0
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions adapters/sonobi/sonobi.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ func (a *SonobiAdapter) MakeBids(internalRequest *openrtb2.BidRequest, externalR
for i := range sb.Bid {
bid := sb.Bid[i]
bidType, err := getMediaTypeForImp(bid.ImpID, internalRequest.Imp)
//bidType, err := getBidType(bid)
if err != nil {
return nil, []error{err}
}
Expand Down Expand Up @@ -172,20 +171,3 @@ func getMediaTypeForImp(impID string, imps []openrtb2.Imp) (openrtb_ext.BidType,
Message: fmt.Sprintf("Failed to find impression \"%s\" ", impID),
}
}
func getBidType(bid openrtb2.Bid) (openrtb_ext.BidType, error) {
// determinate media type by bid response field mtype
switch bid.MType {
case openrtb2.MarkupBanner:
return openrtb_ext.BidTypeBanner, nil
case openrtb2.MarkupVideo:
return openrtb_ext.BidTypeVideo, nil
case openrtb2.MarkupAudio:
return openrtb_ext.BidTypeAudio, nil
case openrtb2.MarkupNative:
return openrtb_ext.BidTypeNative, nil
}

return "", &errortypes.BadInput{
Message: fmt.Sprintf("Could not define media type for impression: %s", bid.ImpID),
}
}

0 comments on commit 835d0e0

Please sign in to comment.