feat: UDM鉴权文件导入K4文件支持
This commit is contained in:
@@ -3,6 +3,7 @@ package fetchlink
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/fetch"
|
||||
@@ -30,7 +31,7 @@ func UDMImportAuth(udmIP string, data map[string]any) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
if v, ok := resData["code"]; ok && v == "00000" {
|
||||
return "ok", nil
|
||||
return strings.TrimSpace(strings.ToLower(resData["message"])), nil
|
||||
}
|
||||
return "", fmt.Errorf(resData["message"])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user