修复:checkName 接口语义反了,data=false 表示名称可用
This commit is contained in:
1 parent
4d9b0b8f35
commit
c3c389146f
1 file changed
+2
-2
@@ -4,9 +4,9 @@ from ekb_cli.api import EkbClient
|
||||
|
||||
|
||||
def check_agent_name(client: EkbClient, name: str) -> bool:
|
||||
"""检查名称是否可用:True=可用,False=已存在"""
|
||||
"""检查名称是否可用:True=可用,False=已存在(接口 data=false 表示可用)"""
|
||||
resp = client.get("/engine/hab/agent/checkName", name=name)
|
||||
return resp.get("data", True)
|
||||
return not resp.get("data", False)
|
||||
|
||||
|
||||
def list_agents(client: EkbClient, page: int = 1, size: int = 1000) -> dict:
|
||||
|
||||
Reference in new issue
Block a user