Skip to content

Commit

Permalink
feat: change getImpressionExt code
Browse files Browse the repository at this point in the history
  • Loading branch information
tradplus committed Oct 18, 2024
1 parent 4ca9543 commit ef7a58c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions adapters/tradplus/tradplus.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ func getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtImpTradPlus, error) {
}
}

if tradplusExt.AccountID == "" {
return nil, &errortypes.BadInput{
Message: "imp.ext.accountId required",
}
}

return &tradplusExt, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"expectedMakeRequestsErrors": [
{
"value": "json: cannot unmarshal string into Go value of type adapters.ExtImpBidder",
"value": "Error parsing tradplusExt - json: cannot unmarshal string into Go value of type adapters.ExtImpBidder",
"comparison": "literal"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"expectedMakeRequestsErrors": [
{
"value": "json: cannot unmarshal string into Go value of type openrtb_ext.ExtImpTradPlus",
"value": "Error parsing bidderExt - json: cannot unmarshal string into Go value of type openrtb_ext.ExtImpTradPlus",
"comparison": "literal"
}
]
Expand Down

0 comments on commit ef7a58c

Please sign in to comment.