Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BizzClick committed Dec 12, 2023
1 parent 720f847 commit 95c41ac
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion adapters/bizzclick/bizzclick.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ func (a *adapter) getImpressionExt(imp *openrtb2.Imp) (*openrtb_ext.ExtBizzclick
}

func (a *adapter) buildEndpointURL(params *openrtb_ext.ExtBizzclick) (string, error) {
endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID, SourceId: params.SourceID, Host: params.Host}
host := "us-e-node1"
if params.Host != "" {
host = params.Host
}
endpointParams := macros.EndpointTemplateParams{AccountID: params.AccountID, SourceId: params.SourceID, Host: host}
return macros.ResolveMacros(a.endpoint, endpointParams)
}

Expand Down
2 changes: 1 addition & 1 deletion adapters/bizzclick/params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

var validParams = []string{
`{ "accountId": "hash", "placementId": "hash"}`,
`{ "host": "ep1", "sourceId": "partner", "accountId": "hash" }`,
}

func TestValidParams(t *testing.T) {
Expand Down
14 changes: 11 additions & 3 deletions static/bidder-params/bizzclick.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@
"description": "Account id",
"minLength": 1
},
"placementId": {
"sourceId": {
"type": "string",
"description": "PlacementId id",
"description": "Source id",
"minLength": 1
},
"host": {
"type": "string",
"description": "Server region",
"minLength": 1
}
},
"required": ["accountId", "placementId"]
"required": [
"accountId",
"sourceId"
]
}

0 comments on commit 95c41ac

Please sign in to comment.