mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
fix max newAuthenticatedRequest for nil data
This commit is contained in:
parent
9ebccc72ba
commit
530da665d3
|
@ -183,6 +183,14 @@ func (c *RestClient) newAuthenticatedRequest(m string, refURL string, data inter
|
|||
var p []byte
|
||||
|
||||
switch d := data.(type) {
|
||||
|
||||
case nil:
|
||||
payload := map[string]interface{}{
|
||||
"nonce": c.getNonce(),
|
||||
"path": c.BaseURL.ResolveReference(rel).Path,
|
||||
}
|
||||
p, err = json.Marshal(payload)
|
||||
|
||||
case map[string]interface{}:
|
||||
payload := map[string]interface{}{
|
||||
"nonce": c.getNonce(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user