liuxiulin 7 months ago
parent
commit
5be54ba28a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      pkg/models/ota.go

+ 3 - 1
pkg/models/ota.go

@@ -37,6 +37,8 @@ func (a *OtaUpgradeParams) Validate() error {
 	if a.FileId == "" {
 		return errors.New("非法参数:[file_id]")
 	}
-
+	if len(a.DeviceIDs) == 0 {
+		return errors.New("device_ids 不能为空")
+	}
 	return nil
 }