WrenchFamily::familyList
This commit is contained in:
@@ -103,7 +103,7 @@ $routes->post('/en/wrench/api/v1/tasksreport', 'WrenchApi::apigate');
|
||||
$routes->post('/en/wrench/api/v1/mypageload', 'WrenchApi::apigate');
|
||||
$routes->post('/en/wrench/api/v1/mypageintro', 'WrenchApi::apigate');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/familylist', 'WrenchApi::apigate');
|
||||
$routes->post('/en/wrench/api/v1/familylist', 'WrenchFamily::familyList');
|
||||
//$routes->post('/en/wrench/api/v1/familywallet', 'WrenchApi::apigate');
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use CodeIgniter\API\ResponseTrait;
|
||||
|
||||
class WrenchFamily extends BaseController
|
||||
{
|
||||
|
||||
use ResponseTrait;
|
||||
public function __construct()
|
||||
{
|
||||
$this->request = $request = \Config\Services::request();
|
||||
@@ -30,8 +32,7 @@ class WrenchFamily extends BaseController
|
||||
log_message('critical', "familyConnectMembers ********* COUNT ".serialize(count($out["result_list"])) );
|
||||
$this->saveCache($endpoint,$out,1500);
|
||||
}
|
||||
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
|
||||
public function familyConnectInvite(){
|
||||
@@ -53,7 +54,7 @@ class WrenchFamily extends BaseController
|
||||
$out["allow_invite"] = 100;
|
||||
$out['internal_return'] = 0;
|
||||
|
||||
return $this->summaryReturnData($in,$out);
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
public function familyConnect(){
|
||||
|
||||
@@ -74,7 +75,7 @@ class WrenchFamily extends BaseController
|
||||
$out["allow_invite"] = 100;
|
||||
$out['internal_return'] = 0;
|
||||
|
||||
return $this->summaryReturnData($in,$out);
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
public function relativeEditKids(){
|
||||
$raw_json = file_get_contents('php://input');
|
||||
@@ -85,7 +86,7 @@ class WrenchFamily extends BaseController
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
|
||||
return $this->summaryReturnData($in,$out);
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
public function relativeSettings(){
|
||||
$raw_json = file_get_contents('php://input');
|
||||
@@ -96,7 +97,7 @@ class WrenchFamily extends BaseController
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
|
||||
return $this->summaryReturnData($in,$out);
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
public function relativeReminder(){
|
||||
$raw_json = file_get_contents('php://input');
|
||||
@@ -107,7 +108,7 @@ class WrenchFamily extends BaseController
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
|
||||
return $this->summaryReturnData($in,$out);
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
|
||||
public function familyBanners(){
|
||||
@@ -126,7 +127,7 @@ class WrenchFamily extends BaseController
|
||||
log_message('critical', "familyBanners ********* ALL ".serialize($out["result_list"]) );
|
||||
$this->saveCache($endpoint,$out,1500);
|
||||
}
|
||||
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
|
||||
public function familySampleTasks(){
|
||||
@@ -143,7 +144,7 @@ class WrenchFamily extends BaseController
|
||||
if ($ret == 0)
|
||||
$this->saveCache($endpoint,$out,65000);
|
||||
}
|
||||
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
|
||||
|
||||
@@ -160,6 +161,28 @@ class WrenchFamily extends BaseController
|
||||
$out['internal_return'] = $ret;
|
||||
$this->saveCache($endpoint,$out,1000);
|
||||
}
|
||||
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
|
||||
public function familyList()
|
||||
{
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
|
||||
$in["action"] = WRENCHBOARD_FAMILY_LIST;
|
||||
|
||||
$out = [];
|
||||
$endpoint = "WRENCHBOARD_FAMILY_LIST-".$in["uid"];
|
||||
|
||||
$out = $this->getCache($endpoint);
|
||||
if (count($out) == 0) {
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$this->saveCache($endpoint, $out, 1500);
|
||||
$out['internal_return'] = $ret;
|
||||
log_message('critical', "***** ***** WrenchFamily::familyList Cache Done:::Ret " . $ret);
|
||||
}
|
||||
log_message('critical', "***** ***** WrenchFamily::familyList Ret ");
|
||||
return $this->respond($this->summaryReturnData($in, $out), 200);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user