fix end poinst

This commit is contained in:
CHIEFSOFT\ameye
2024-09-14 11:29:19 -04:00
parent 3fc9c5bfaf
commit 8ecbdb04e0
3 changed files with 87 additions and 2 deletions
+8 -2
View File
@@ -7,6 +7,12 @@ use CodeIgniter\Router\RouteCollection;
*/
$routes->post('/callback/cards', 'DigiCallBack::cardAccount');
$routes->get('/flow/v1/new-account', 'AirFlow::flowNewAccount');
$routes->get('/flow/v1/applicationreminder', 'AirFlow::flowAppReminder');
$routes->get('/flow/v1/dailyreports', 'AirFlow::flowDailyReports');
$routes->get('/flow/v1/generalalerts', 'AirFlow::flowGeneralAlerts');
$routes->get('/flow/v1/newemployers', 'AirFlow::flowNewEmployers');
$routes->get('/flow/v1/paymentreminder', 'AirFlow::flowPaymentReminder');
$routes->get('/flow/v1/verifyempoyer', 'AirFlow::flowVerifyEmpoyer');
$routes->get('/', 'Home::index');
@@ -36,9 +42,9 @@ $routes->patch('/digibko/v1/employers/signatory', 'BkoReports::sign
$routes->post('/digibko/v1/employers/verify', 'Employers::verifyEmployer');
$routes->get('/digibko/v1/users', 'BkoReports::listUsers');
$routes->get('/digibko/v1/users', 'BkoReports::listUsers');
$routes->get('/digibko/v1/customers', 'BkoReports::listCustomers');
$routes->get('/digibko/v1/customers/(:any)', 'BkoReports::getCustomer/$1');
$routes->post('/digibko/v1/employer', 'BkoReports::employerAdd');
+61
View File
@@ -15,6 +15,67 @@ class AirFlow extends BaseController
return []; //json_encode( $final_out );
}
public function flowAppReminder(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
// $this->processLoadData();
log_message('critical', "AirFlow::flowAppReminder ********* ALL ".serialize($in) );
return []; //json_encode( $final_out );
}
public function flowDailyReports(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
// $this->processLoadData();
log_message('critical', "AirFlow::flowDailyReports ********* ALL ".serialize($in) );
return []; //json_encode( $final_out );
}
public function flowGeneralAlerts(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
// $this->processLoadData();
log_message('critical', "AirFlow::flowGeneralAlerts ********* ALL ".serialize($in) );
return []; //json_encode( $final_out );
}
public function flowNewEmployers(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
// $this->processLoadData();
log_message('critical', "AirFlow::flowNewEmployers ********* ALL ".serialize($in) );
return []; //json_encode( $final_out );
}
public function flowPaymentReminder(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
// $this->processLoadData();
log_message('critical', "AirFlow::flowPaymentReminder ********* ALL ".serialize($in) );
return []; //json_encode( $final_out );
}
public function flowVerifyEmpoyer(){
$raw_json = file_get_contents('php://input');
$in = json_decode($raw_json, true);
$out =[];
// $this->processLoadData();
log_message('critical', "AirFlow::flowVerifyEmpoyer ********* ALL ".serialize($in) );
return []; //json_encode( $final_out );
}
private function processLoadData(){
$mysql ="SELECT uid,customer_uid,loan_detail
FROM applications
+18
View File
@@ -309,6 +309,24 @@ public function signatoryUpdate():ResponseInterface{
return $this->respond($data, 200);
}
public function getCustomer($uid){
$query = $this->db->query("SELECT * FROM customers WHERE uid::text ='".$uid."'");
$rowC = $query->getResult('array');
$mySqA ="SELECT uid AS applications_uid, loan_amount, added, payment_month FROM applications WHERE customer_uid::text ='".$uid."'";
$query = $this->db->query($mySqA);
$rowA = $query->getResult('array');
$data = [
'call_return' => '100',
'customer' => $rowC,
'applications' => $rowA
];
return $this->respond($data, 200);
}
public function listCustomers():ResponseInterface{
$query = $this->db->query("select * from customers order by id desc");