Set d.Key for all settings updates

This commit is contained in:
Kurt McAlpine
2021-04-06 10:48:56 +12:00
committed by Paul Tyng
parent ac8d0c5659
commit bd8898db77
32 changed files with 157 additions and 1 deletions

View File

@@ -67,7 +67,6 @@ type SettingSuperMgmt struct {
LiveUpdates string `json:"live_updates,omitempty"` // disabled|live|auto
MinimumUsableHdSpace int `json:"minimum_usable_hd_space,omitempty"`
MinimumUsableSdSpace int `json:"minimum_usable_sd_space,omitempty"`
MultipleSitesEnabled bool `json:"multiple_sites_enabled"`
OverrideInformHost bool `json:"override_inform_host"`
StoreEnabled string `json:"store_enabled,omitempty"` // disabled|super-only|everyone
TimeSeriesPerClientStatsEnabled bool `json:"time_series_per_client_stats_enabled"`
@@ -135,6 +134,7 @@ func (c *Client) updateSettingSuperMgmt(ctx context.Context, site string, d *Set
Data []SettingSuperMgmt `json:"data"`
}
d.Key = "super_mgmt"
err := c.do(ctx, "PUT", fmt.Sprintf("s/%s/set/setting/super_mgmt", site), d, &respBody)
if err != nil {
return nil, err