diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 008b806..49a4c8f 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -34,6 +34,7 @@ $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/customers', 'BkoReports::listCustomers'); $routes->post('/digibko/v1/employer', 'BkoReports::employerAdd'); diff --git a/app/Controllers/BkoReports.php b/app/Controllers/BkoReports.php index 1ac3642..2c1a80c 100644 --- a/app/Controllers/BkoReports.php +++ b/app/Controllers/BkoReports.php @@ -308,4 +308,15 @@ public function signatoryUpdate():ResponseInterface{ ]; return $this->respond($data, 200); } + + public function listCustomers():ResponseInterface{ + + $query = $this->db->query("select * from customers order by id desc"); + $row = $query->getResult('array'); + $data = [ + 'call_return' => '100', + 'records' => $row + ]; + return $this->respond($data, 200); + } } \ No newline at end of file