Merge branch 'fronkdev' into 'master'

AHA download now uses correct Rimo API key

See merge request fronk/thetool!1219
This commit is contained in:
Frank Schubert
2025-04-14 13:09:50 +00:00
5 changed files with 46 additions and 9 deletions
+5 -5
View File
@@ -288,7 +288,7 @@ class Rimoapi {
return $resp_data;
}
public static function getWorkorderAhaReport($rimo_id) {
public static function getWorkorderAhaReport($apikey, $rimo_id) {
$log = mfLoghandler::singleton();
if(!$rimo_id) {
@@ -296,7 +296,7 @@ class Rimoapi {
return false;
}
$items = self::getFilenames($rimo_id);
$items = self::getFilenames($apikey, $rimo_id);
if(!is_object($items)) {
return false;
@@ -321,7 +321,7 @@ class Rimoapi {
// fetch file
$params = [];
$params['apiKey'] = RIMO_API_JSON_APIKEY;
$params['apiKey'] = $apikey;
$params['objectId'] = $rimo_id;
$params['fileNames'] = $filename;
@@ -396,13 +396,13 @@ class Rimoapi {
return $filecontent;
}
public static function getFilenames($rimo_id) {
public static function getFilenames($apikey, $rimo_id) {
if(!$rimo_id) return false;
$log = mfLoghandler::singleton();
$params = [];
$params['apiKey'] = RIMO_API_JSON_APIKEY;
$params['apiKey'] = $apikey;
$params['objectId'] = $rimo_id;
$ctx_opts = [