Skip to content

Commit

Permalink
move getMediaTypeForBid to the end of the adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
saar120 committed Nov 26, 2024
1 parent a46e40c commit 50d1293
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions adapters/kueezrtb/kueezrtb.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte
return requests, errors
}

func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) {
switch bid.MType {
case openrtb2.MarkupBanner:
return openrtb_ext.BidTypeBanner, nil
case openrtb2.MarkupVideo:
return openrtb_ext.BidTypeVideo, nil
}
return "", &errortypes.BadInput{
Message: fmt.Sprintf("Could not define bid type for imp: %s", bid.ImpID),
}
}

func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.RequestData, responseData *adapters.ResponseData) (*adapters.BidderResponse, []error) {
var errs []error

Expand Down Expand Up @@ -132,3 +120,15 @@ func extractCid(imp *openrtb2.Imp) (string, error) {
}
return strings.TrimSpace(impExt.ConnectionId), nil
}

func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) {
switch bid.MType {
case openrtb2.MarkupBanner:
return openrtb_ext.BidTypeBanner, nil
case openrtb2.MarkupVideo:
return openrtb_ext.BidTypeVideo, nil
}
return "", &errortypes.BadInput{
Message: fmt.Sprintf("Could not define bid type for imp: %s", bid.ImpID),
}
}

0 comments on commit 50d1293

Please sign in to comment.