From f90923fd0f1386a51dbe8a4b032eb125478b3916 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Fri, 8 Aug 2025 21:57:02 -0400 Subject: [PATCH] use current tenant name for search --- .../src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php b/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php index bbe93e8..7c00974 100644 --- a/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php +++ b/mocha-php/src/mocha-php/lib/mocha/oms/HttpOmsClient.inc.php @@ -204,7 +204,7 @@ } public function search(string $query, array | InstanceReference | null $parentClasses = null, string | null $m = null) : array | bool { - $uri = "/tenants/super/instances?"; + $uri = "/tenants/" . $this->getTenantName() . "/instances?"; if ($m != null) { @@ -363,6 +363,7 @@ $url = "/tenants/" . $this->getTenantName() . "/instances/" . $element->InstanceKey . "/element"; if ($relatedInstance !== null) { + echo ("POST " . $url); // related instance is passed in by: // UI Task.has Related Menu Item // -> Related Menu Item.uses object of Class @@ -378,9 +379,14 @@ $workDataPost[UUID::parse($key)->__toString()] = strval($value); } */ + print_r($workDataPost); $json = $this->curl_request_json($url, HttpRequestMethod::POST, $workDataPost); return $json; } + else + { + echo ("GET " . $url . "\n"); + } $json = $this->curl_request_json($url); return $json; }