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
+4 -4
View File
@@ -197,7 +197,8 @@ $routes->post('/en/wrench/api/v1/signupcountry', 'WrenchGeneralData::signUp
$routes->post('/en/wrench/api/v1/userscards', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/countrystate', 'WrenchResources::getCountryStates');
$routes->post('/en/wrench/api/v1/resources', 'WrenchResources::website');
$routes->post('/en/wrench/api/v1/askresources', 'WrenchResources::aigate');
$routes->post('/en/wrench/api/v1/couponhx', 'WrenchApi::apigate');
@@ -216,7 +217,7 @@ $routes->post('/en/wrench/api/v1/assigntask', 'WrenchJobs::assignTask' ); //
$routes->post('/en/wrench/api/v1/assignmediatask','WrenchJobs::assignTask' ); //'WrenchApi::apigate'
$routes->post('/en/wrench/api/v1/uploads', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/myfiles', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/myfiles', 'WrenchUser::UsersFiles'); //'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/marketmessage', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/marketinterest', 'WrenchJobs::sendJobInterest'); //'WrenchApi::apigate'
@@ -237,8 +238,7 @@ $routes->post('/en/wrench/api/v1/offersinterestproc', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/offerinterestmsg', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/offerinterestlistmsg', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/resources', 'WrenchResources::website');
$routes->post('/en/wrench/api/v1/askresources', 'WrenchResources::aigate');
$routes->post('/en/wrench/api/v1/setaccsettings', 'WrenchApi::apigate');
$routes->post('/en/wrench/api/v1/getaccsettings', 'WrenchApi::apigate');
+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);
}
}