* [misc] adjust instance uninstall logic.

This commit is contained in:
caoyanyi
2024-12-30 10:54:50 +08:00
committed by 李阳
parent cd68d200aa
commit f8a62b435d
+2 -3
View File
@@ -792,10 +792,9 @@ class instanceModel extends model
$result = $this->cne->uninstallApp($apiParams);
$success = $result->code == 200 || $result->code == 404;
if($success) $this->dao->update(TABLE_INSTANCE)->set('deleted')->eq(1)->where('id')->eq($instance->id)->exec();
if($success) $this->dao->delete()->from(TABLE_INSTANCE)->where('id')->eq($instance->id)->exec();
$url = strstr(getWebRoot(true), ':', true) . '://' . $instance->domain;
$this->dao->delete()->from(TABLE_PIPELINE)->where('url')->eq($url)->exec();
$this->dao->delete()->from(TABLE_PIPELINE)->where('instanceID')->eq($instance->id)->exec();
return $success;
}