Skip to content

Commit

Permalink
Fix GoReport issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bb4L committed Jul 9, 2021
1 parent 10ae19b commit 1a57827
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/radio.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,16 @@ func (helper *Helper) GetRadio(withWritePermission bool) (types.Radio, error) {
func (helper *Helper) SaveRadio(radio types.Radio) (types.Radio, error) {
if radio.Running {
return helper.StartRadio()
} else {
return helper.StopRadio()
}
return helper.StopRadio()
}

// SwitchRadio changes the radio to the state running passed as argument
func (helper *Helper) SwitchRadio(running bool) (types.Radio, error) {
if running {
return helper.StartRadio()

} else {
return helper.StopRadio()
}
return helper.StopRadio()
}

// StartRadio starts the radio
Expand Down

0 comments on commit 1a57827

Please sign in to comment.