Skip to content

Commit 6a578ca

Browse files
committed
allow empty settings to be sent
This is for the case where the api has settings already saved
1 parent e8dbbac commit 6a578ca

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

api.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,6 @@ func (api *CacophonyAPI) GetDeviceSettings() (map[string]interface{}, error) {
785785

786786
// UpdateDeviceSettings updates the device settings on the API and returns the updated settings
787787
func (api *CacophonyAPI) UpdateDeviceSettings(settings map[string]interface{}) (map[string]interface{}, error) {
788-
if len(settings) == 0 {
789-
fmt.Println("settings is empty")
790-
return nil, nil
791-
}
792788
url := joinURL(api.serverURL, apiBasePath, "devices/"+strconv.Itoa(api.device.id)+"/settings")
793789
payload, err := json.Marshal(map[string]interface{}{
794790
"settings": settings,

0 commit comments

Comments
 (0)