liuxiulin 7 tháng trước cách đây
mục cha
commit
5be54ba28a
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  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
 }