Skip to content

Commit

Permalink
CR feedback. Return explicit bid type. (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ym-prasanth authored Nov 16, 2023
1 parent 14ebf6b commit c68be34
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion adapters/yieldmo/yieldmo.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,14 @@ func getMediaTypeForImp(bid openrtb2.Bid) (openrtb_ext.BidType, error) {
return "", &errortypes.BadInput{Message: err.Error()}
}

return openrtb_ext.ParseBidType(bidExt.MediaType)
switch bidExt.MediaType {
case "banner":
return openrtb_ext.BidTypeBanner, nil
case "video":
return openrtb_ext.BidTypeVideo, nil
case "native":
return openrtb_ext.BidTypeNative, nil
default:
return "", fmt.Errorf("invalid BidType: %s", bidExt.MediaType)
}
}

0 comments on commit c68be34

Please sign in to comment.