[add] Sending new work day data to backend
This commit is contained in:
@@ -577,5 +577,9 @@ class EmployeeApplication{
|
||||
|
||||
return $matches;
|
||||
}
|
||||
|
||||
function SaveNewWorkDay($requestData){
|
||||
return array('status' => 'success', 'message' => 'Saved...', 'data' => $requestData);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -95,4 +95,12 @@ $app->get('/api/employee/code/{code}', function (Request $request, Response $res
|
||||
return $response->withStatus(200)
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->write(json_encode($this->employeeApplication->getEmployeeDataByCode($code)));
|
||||
});
|
||||
|
||||
$app->post('/api/employee/workday', function ($request, $response) {
|
||||
$requestData = $request->getParsedBody();
|
||||
|
||||
return $response->withStatus(200)
|
||||
->withHeader('Content-Type', 'application/json')
|
||||
->write(json_encode($this->employeeApplication->SaveNewWorkDay($requestData)));
|
||||
});
|
||||
Reference in New Issue
Block a user