Skip to content

Commit

Permalink
cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yfcr committed Nov 15, 2023
1 parent c1eaced commit 992de01
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions adapters/oms/oms.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type adapter struct {
endpoint string
}

// Builder builds a new instance of the Foo adapter for the given bidder with the given config.
// Builder builds a new instance of the OMS adapter for the given bidder with the given config.
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
bidder := &adapter{
endpoint: config.Endpoint,
Expand All @@ -39,6 +39,7 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, requestInfo *adapte
}

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

if responseData.StatusCode == http.StatusNoContent {
return nil, nil
}
Expand All @@ -63,7 +64,9 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R
}

bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(request.Imp))
bidResponse.Currency = response.Cur
if len(response.Cur) == 0 {
bidResponse.Currency = response.Cur
}
for _, seatBid := range response.SeatBid {
for i := range seatBid.Bid {
bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
Expand All @@ -72,5 +75,6 @@ func (a *adapter) MakeBids(request *openrtb2.BidRequest, requestData *adapters.R
})
}
}

return bidResponse, nil
}

0 comments on commit 992de01

Please sign in to comment.