Load profile
This commit is contained in:
@@ -9,8 +9,7 @@ $routes->get('/', 'Home::index');
|
||||
|
||||
|
||||
$routes->post('/digibko/v1/identity/token', 'DigiFiAuth::startBkoToken');
|
||||
|
||||
$routes->get('/digibko/v1/loan/started', 'BkoReports::startedApplication');
|
||||
$routes->get('/digibko/v1/loan/started', 'BkoReports::startedApplication');
|
||||
|
||||
|
||||
$routes->get('/digibko/v1/dashboard/bvn/recent', 'DigiFiAuth::startBkoToken');
|
||||
@@ -20,6 +19,8 @@ $routes->post('/digiusers/v1/bvn', 'DigiFiBVN::startBVNVerify')
|
||||
$routes->post('/digiusers/v1/bvn/verify', 'DigiFiBVN::completeBVNVerify');
|
||||
|
||||
$routes->get('/digiusers/v1/dash', 'Users::userDash');
|
||||
$routes->get('/digiusers/v1/profile', 'Users::userProfile');
|
||||
|
||||
|
||||
$routes->post('/digiusers/v1/loan/apply', 'Loan::loanApply');
|
||||
$routes->get('/digiusers/v1/loan/loanlist', 'Loan::loanlist');
|
||||
|
||||
@@ -10,8 +10,14 @@ class BkoReports extends BaseController
|
||||
public function startedApplication() :ResponseInterface
|
||||
{
|
||||
//SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications;
|
||||
|
||||
return $this->respond([], 200);
|
||||
$query = $this->db->query("SELECT uid,loan_amount,payment_month,sales_agent,gender,marital_status,email,address,state,country,status,added,updated FROM applications ");
|
||||
$row = $query->getResult('array');
|
||||
$data = [
|
||||
'call_return' => '100',
|
||||
'records' => $row
|
||||
];
|
||||
return $this->respond($data, 200);
|
||||
// return $this->respond([], 200);
|
||||
}
|
||||
public function pendingApplication() :ResponseInterface
|
||||
{
|
||||
|
||||
@@ -29,6 +29,13 @@ class Loan extends BaseController
|
||||
country VARCHAR(3),
|
||||
loan_detail TEXT,
|
||||
*/
|
||||
// header('Access-Control-Allow-Origin: "*" ');
|
||||
//header("Access-Control-Allow-Headers: Origin, X-API-KEY, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Access-Control-Allow-Headers, Authorization, observe, enctype, Content-Length, X-Csrf-Token");
|
||||
// log_message('critical', "0003");
|
||||
// header("Access-Control-Allow-Methods: GET, PUT, POST, DELETE, PATCH, OPTIONS");
|
||||
// header("Access-Control-Allow-Credentials: true");
|
||||
// header("Access-Control-Max-Age: 3600");
|
||||
// header('content-type: application/json; charset=utf-8');
|
||||
|
||||
$data = $this->request->getPost();
|
||||
|
||||
@@ -54,7 +61,7 @@ disbursement
|
||||
log_message('error', "UID3-employment--=>" . serialize( $data->employment));
|
||||
log_message('error', "UID3-loan_reference--=>" . serialize( $data->loan_reference));
|
||||
log_message('error', "UID3-disbursement--=>" . serialize( $data->disbursement));
|
||||
|
||||
|
||||
// log_message('error', "UID3---=>" . $data2->customer_uid);
|
||||
// log_message('error', "UID4---=>" . $data2["customer_uid"]);
|
||||
|
||||
|
||||
@@ -27,4 +27,20 @@ class Users extends BaseController
|
||||
return $this->respond($data, 200);
|
||||
}
|
||||
|
||||
public function userProfile(){
|
||||
$in = $this->request->getGet();
|
||||
$data = [];
|
||||
if ($in['uid'] !=''){
|
||||
$query = $this->db->query("SELECT * FROM customers WHERE uid = '".$in['uid']."' ");
|
||||
$row = $query->getRowArray();
|
||||
$data = [
|
||||
'call_return' => '100',
|
||||
'customer' => $row
|
||||
];
|
||||
return $this->respond($data, 200);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user