diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 1095e66..0cb77ef 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -23,6 +23,8 @@ $routes->get('/digibko/v1/loan/rejected', 'BkoReports::rejectedApplication' $routes->get('/digibko/v1/employers', 'BkoReports::employersList'); +$routes->post('/digibko/v1/employer', 'BkoReports::employerAdd'); + /* * Processing the loan from back office */ diff --git a/app/Controllers/BkoReports.php b/app/Controllers/BkoReports.php index 15771fb..e2f4d04 100644 --- a/app/Controllers/BkoReports.php +++ b/app/Controllers/BkoReports.php @@ -130,4 +130,14 @@ public function employersList() :ResponseInterface { return $this->respond($data, 200); } + public function employerAdd():ResponseInterface{ + $data = $this->request->getPost(); + $insert_data = $data; + $result = $this-> insert_db('employers', $insert_data); + $result_data = [ + 'call_return' => '100', + 'result' =>$result + ]; + return $this->respond($result_data, 200); + } } \ No newline at end of file