mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
Merge pull request #6779 from ioito/hotfix/qx-huawei-cloudevent-succ
fix: 更正华为云操作成功判断
This commit is contained in:
@@ -16,7 +16,7 @@ package huawei
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"yunion.io/x/jsonutils"
|
||||
@@ -88,7 +88,8 @@ func (event *SEvent) GetAccount() string {
|
||||
}
|
||||
|
||||
func (event *SEvent) IsSuccess() bool {
|
||||
return strings.HasPrefix(event.Code, "2") || len(event.Code) == 0
|
||||
code, _ := strconv.Atoi(event.Code)
|
||||
return code < 400
|
||||
}
|
||||
|
||||
func (event *SEvent) GetCreatedAt() time.Time {
|
||||
|
||||
Reference in New Issue
Block a user