Skip to content

Commit 90d3a2b

Browse files
authored
Merge pull request #40 from TheCacophonyProject/sync-settings
allow empty settings to be sent
2 parents a30b058 + 6a578ca commit 90d3a2b

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
@@ -777,10 +777,6 @@ func (api *CacophonyAPI) GetDeviceSettings() (map[string]interface{}, error) {
777777

778778
// UpdateDeviceSettings updates the device settings on the API and returns the updated settings
779779
func (api *CacophonyAPI) UpdateDeviceSettings(settings map[string]interface{}) (map[string]interface{}, error) {
780-
if len(settings) == 0 {
781-
fmt.Println("settings is empty")
782-
return nil, nil
783-
}
784780
url := joinURL(api.serverURL, apiBasePath, "devices/"+strconv.Itoa(api.device.id)+"/settings")
785781
payload, err := json.Marshal(map[string]interface{}{
786782
"settings": settings,

0 commit comments

Comments
 (0)