Skip to content

Commit

Permalink
Fix review points
Browse files Browse the repository at this point in the history
  • Loading branch information
symplorpro committed Feb 21, 2025
1 parent 359f454 commit 3533e8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
17 changes: 7 additions & 10 deletions adapters/rediads/rediads.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,13 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte
}

func getMediaTypeForBid(bid openrtb2.Bid) (openrtb_ext.BidType, error) {
if bid.Ext != nil {
var bidExt openrtb_ext.ExtBid
err := jsonutil.Unmarshal(bid.Ext, &bidExt)
if err == nil && bidExt.Prebid != nil {
return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))
}
}

return "", &errortypes.BadServerResponse{
Message: fmt.Sprintf("Failed to parse impression \"%s\" mediatype", bid.ImpID),
switch bid.MType {
case openrtb2.MarkupBanner:
return openrtb_ext.BidTypeBanner, nil
case openrtb2.MarkupNative:
return openrtb_ext.BidTypeNative, nil
default:
return "", fmt.Errorf("Failed to find impression type \"%s\"", bid.ImpID)
}
}

Expand Down
1 change: 0 additions & 1 deletion adapters/rediads/rediads_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package rediads

import (
"fmt"
"testing"

"github.com/prebid/prebid-server/v3/adapters/adapterstest"
Expand Down

0 comments on commit 3533e8c

Please sign in to comment.