diff --git a/controllers/api_controller.go b/controllers/api_controller.go index a6516a232..99c8252cb 100644 --- a/controllers/api_controller.go +++ b/controllers/api_controller.go @@ -278,10 +278,11 @@ func (c *ApiController) UpdatePrinter(dataMap map[string]interface{}) (data, err } else { sound = &soundStr } - if volumeInt, ok := dataMap[keyVolume].(int); !ok { + if volumeInt, ok := dataMap[keyVolume].(string); !ok { volume = nil } else { - volume = &volumeInt + volumeStr := utils.Str2Int(volumeInt) + volume = &volumeStr } appID = utils.Str2Int(dataMap[keyAppID].(string)) if err = cms.UpdatePrinter(appID, printNo, name, sim, sound, volume); err != nil {