feat: UDM鉴权文件导入K4文件支持
This commit is contained in:
1 parent
286e40a4e9
commit
df06ead361
3 files changed
+90
-10
No files matched your search
@@ -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