builder->SetType(type->GetName());
builder->SetName(name);
builder->SetScope(ScriptGlobal::GetGlobals());
+ builder->SetModule("_api");
Array::Ptr templates = params->Get("templates");
Dictionary::Ptr result1 = new Dictionary();
result1->Set("type", type->GetName());
result1->Set("name", obj->GetName());
+ results->Add(result1);
+
+ if (obj->GetModule() != "_api") {
+ result1->Set("code", 500);
+ result1->Set("status", "Object cannot be deleted because it was not created using the API.");
+ continue;
+ }
ConfigItem::Ptr item = ConfigItem::GetObject(type->GetName(), obj->GetName());
result1->Set("code", 500);
result1->Set("status", "Object could not be deleted: " + DiagnosticInformation(ex));
}
-
- results->Add(result1);
}
Dictionary::Ptr result = new Dictionary();