* Refactor zanode::destroy.

This commit is contained in:
wangxuepeng
2023-12-27 13:50:41 +08:00
parent e65da8db06
commit fd3b3478b6
3 changed files with 66 additions and 1 deletions
+2 -1
View File
@@ -301,8 +301,9 @@ class zanodemodel extends model
public function destroy(int $id): string
{
$node = $this->getNodeByID($id);
if(!$node) return '';
if($node && $node->hostType != 'physics')
if($node->hostType != 'physics')
{
$req = array( 'name' => $node->name );
$agnetUrl = 'http://' . $node->ip . ':' . $node->hzap;