* [misc] adjust instance uninstall logic.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user