From 6226c2690de62bb855ecc8cdc678b5c98e085928 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Wed, 12 Jun 2019 05:23:48 +0200 Subject: [PATCH] really fix account_set --- extras/jsonrpc/daemon.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extras/jsonrpc/daemon.go b/extras/jsonrpc/daemon.go index 4465c0e..25fd807 100644 --- a/extras/jsonrpc/daemon.go +++ b/extras/jsonrpc/daemon.go @@ -159,7 +159,15 @@ type AccountSettings struct { func (d *Client) AccountSet(accountID string, settings AccountSettings) (*Account, error) { response := new(Account) - return response, d.call(response, "account_set", map[string]interface{}{}) + args := struct { + AccountID string `json:"account_id"` + AccountSettings `json:",flatten"` + }{ + AccountID: accountID, + AccountSettings: settings, + } + structs.DefaultTagName = "json" + return response, d.call(response, "account_set", structs.Map(args)) } func (d *Client) AccountBalance(account *string) (*AccountBalanceResponse, error) {