Skip to content

Commit

Permalink
Resolve Issue #3774
Browse files Browse the repository at this point in the history
  • Loading branch information
Hina committed Jul 17, 2024
1 parent 088a1cc commit 9ad2ea0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
9 changes: 5 additions & 4 deletions adapters/ownadx/ownadx.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ func createBidRequest(rtbBidRequest *openrtb2.BidRequest, imps []openrtb2.Imp) *
}
func (adapter *adapter) buildEndpointURL(params *openrtb_ext.ExtImpOwnAdx) (string, error) {
endpointParams := macros.EndpointTemplateParams{
ZoneID: params.SspId,
AccountID: params.SeatId,
SourceId: params.TokenId,
SspID: params.SspId, // Macro
SeatID: params.SeatId,
TokenID: params.TokenId,
}
return macros.ResolveMacros(adapter.endpoint, endpointParams)
}
Expand Down Expand Up @@ -124,6 +124,7 @@ func groupImpsByExt(imps []openrtb2.Imp) (map[openrtb_ext.ExtImpOwnAdx][]openrtb
}

func (adapter *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalRequest *adapters.RequestData, response *adapters.ResponseData) (*adapters.BidderResponse, []error) {

if response.StatusCode == http.StatusNoContent {
return nil, nil
}
Expand Down Expand Up @@ -159,6 +160,7 @@ func (adapter *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalR

seatBid := bidResp.SeatBid[0]
bidResponse := adapters.NewBidderResponseWithBidsCapacity(len(bidResp.SeatBid[0].Bid))

if len(seatBid.Bid) == 0 {
return nil, []error{
&errortypes.BadServerResponse{
Expand All @@ -169,7 +171,6 @@ func (adapter *adapter) MakeBids(internalRequest *openrtb2.BidRequest, externalR
for i := 0; i < len(seatBid.Bid); i++ {
var bidType openrtb_ext.BidType
bid := seatBid.Bid[i]

bidType, err := getMediaType(bid)
if err != nil {
return nil, []error{&errortypes.BadServerResponse{
Expand Down
3 changes: 3 additions & 0 deletions macros/macros.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ type EndpointTemplateParams struct {
GvlID string
PageID string
SupplyId string
SspID string // Ownadx adapter Macros.
SeatID string
TokenID string
}

// UserSyncPrivacy specifies privacy policy macros, represented as strings, for user sync urls.
Expand Down
3 changes: 2 additions & 1 deletion static/bidder-info/ownadx.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
endpoint: "https://pbs.prebid-ownadx.com/bidder/bid/{{.AccountID}}/{{.ZoneID}}?token={{.SourceId}}"
#endpoint: "https://pbs.prebid-ownadx.com/bidder/bid/{{.AccountID}}/{{.ZoneID}}?token={{.SourceId}}"
endpoint: "https://pbs.prebid-ownadx.com/bidder/bid/{{.SeatID}}/{{.SspID}}?token={{.TokenID}}" # as per suggestion endpoint change
maintainer:
email: prebid-team@techbravo.com
capabilities:
Expand Down
7 changes: 1 addition & 6 deletions static/bidder-params/ownadx.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,5 @@
"description": "Token ID"
}
},

"oneOf": [
{ "required": ["sspId"] },
{ "required": ["feedId"] },
{ "required": ["token"] }
]
"required": ["sspId","seatId","tokenId"]
}

0 comments on commit 9ad2ea0

Please sign in to comment.