Skip to content

Commit

Permalink
Fix review problem
Browse files Browse the repository at this point in the history
  • Loading branch information
faithnh committed Mar 3, 2021
1 parent fb58a7e commit deaf6c0
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions adapters/unicorn/unicorn.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,15 @@ func modifyImps(request *openrtb.BidRequest) error {
}
}

var placementID string
if ext.Bidder.PlacementID != "" {
placementID = ext.Bidder.PlacementID
} else {
placementID, err = getStoredRequestImpID(imp)
if ext.Bidder.PlacementID == "" {
ext.Bidder.PlacementID, err = getStoredRequestImpID(imp)
if err != nil {
return &errortypes.BadInput{
Message: fmt.Sprintf("Error get StoredRequestImpID from imp[%d]: %s", i, err),
}
}
}

ext.Bidder.PlacementID = placementID

imp.Ext, err = json.Marshal(ext)
if err != nil {
return &errortypes.BadInput{
Expand All @@ -157,7 +152,7 @@ func modifyImps(request *openrtb.BidRequest) error {

secure := int8(1)
imp.Secure = &secure
imp.TagID = placementID
imp.TagID = ext.Bidder.PlacementID
}
return nil
}
Expand Down Expand Up @@ -235,8 +230,6 @@ func (a *adapter) MakeBids(request *openrtb.BidRequest, requestData *adapters.Re
if imp.ID == bid.ImpID {
if imp.Banner != nil {
bidType = openrtb_ext.BidTypeBanner
} else if imp.Native != nil {
bidType = openrtb_ext.BidTypeNative
}
}
}
Expand Down

0 comments on commit deaf6c0

Please sign in to comment.