From 6c0f23fde0ba4a85c62e6533c62730ad3eae8921 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 6 Jun 2024 09:38:36 -0400 Subject: [PATCH] employer --- app/Config/Routes.php | 2 ++ app/Controllers/BkoReports.php | 10 ++++++++++ 2 files changed, 12 insertions(+) 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