FEAT_LOG_HR_ACTIVITY : RV
This commit is contained in:
parent
6b3df8e8dc
commit
4110880828
@ -71,6 +71,20 @@ class Database extends Config
|
|||||||
'busyTimeout' => 1000,
|
'busyTimeout' => 1000,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public $postDB = [
|
||||||
|
'DSN' => '',
|
||||||
|
'hostname' => 'localhost',
|
||||||
|
'username' => 'root',
|
||||||
|
'password' => 'root',
|
||||||
|
'database' => 'other_db',
|
||||||
|
'DBDriver' => 'MySQLi',
|
||||||
|
'DBPrefix' => '',
|
||||||
|
'pConnect' => false,
|
||||||
|
'DBDebug' => (ENVIRONMENT !== 'production'),
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'DBCollat' => 'utf8_general_ci',
|
||||||
|
];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|||||||
@ -490,6 +490,8 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
|||||||
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
||||||
$routes->get("getFEContent", "EmployeeRestController::getFEContent");
|
$routes->get("getFEContent", "EmployeeRestController::getFEContent");
|
||||||
$routes->get("getAdvertisementImage", "EmployeeRestController::getAdvertisementImage");
|
$routes->get("getAdvertisementImage", "EmployeeRestController::getAdvertisementImage");
|
||||||
|
$routes->post("logHrActivity", "RestAuthenticationController::logHrActivity");
|
||||||
|
|
||||||
});
|
});
|
||||||
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
||||||
$routes->get("sendPushNotification", "EmployeeRestController::sendPushNotification");
|
$routes->get("sendPushNotification", "EmployeeRestController::sendPushNotification");
|
||||||
@ -510,3 +512,4 @@ $routes->post("addEmployeeAndDependence", "EmployeeRestController::addEmployeeAn
|
|||||||
$routes->post("getPreEmployeePolicyCount", "EmployeeRestController::getPreEmployeePolicyCount");
|
$routes->post("getPreEmployeePolicyCount", "EmployeeRestController::getPreEmployeePolicyCount");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1019,4 +1019,15 @@ class RestAuthenticationController extends AdminController
|
|||||||
], 500);
|
], 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function logHrActivity()
|
||||||
|
{
|
||||||
|
$log_data = $this->request->getJSON();
|
||||||
|
$postDB = \Config\Database::connect('postDB');
|
||||||
|
// print_r($json);die();
|
||||||
|
$postDB->table('user_activity_history')->insert($log_data);
|
||||||
|
return $this->respond(['status' => 'success','code' => 200,'data' => "logged",],200);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user