WrenchUser

This commit is contained in:
CHIEFSOFT\ameye
2024-10-30 10:05:06 -04:00
parent 63e0233ed9
commit 2c933cbdbd
2 changed files with 33 additions and 4 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Controllers;
use CodeIgniter\API\ResponseTrait;
class WrenchUser extends BaseController
{
use ResponseTrait;
public function UsersFiles(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$in["action"] = WRENCHBOARD_MYFILES_LIST;
$out=[];
$endpoint = "UPLOADS-USER-". str_replace("-", "_", $in["uid"]);;
$out = $this->getCache($endpoint);
if ( count($out)==0 ){
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
$this->saveCache($endpoint,$out,15000);
$out['internal_return'] = $ret;
log_message('critical', "***** ***** WrenchUser::UsersFiles Cache Done:::Ret ". $ret);
}
log_message('critical', "***** ***** WrenchUser::UsersFiles Ret ");
return $this->respond( $this->summaryReturnData($in,$out), 200);
}
}