[add} Employee id by code

This commit is contained in:
2018-08-06 01:35:52 -06:00
parent 3d7a574396
commit 2d3f52372c
2 changed files with 32 additions and 0 deletions

View File

@@ -48,3 +48,11 @@ $app->post('/api/employee', function ($request, $response) {
->withHeader('Content-Type', 'application/json')
->write(json_encode($this->employeeApplication->saveNewEmployee($requestData)));
});
$app->get('/api/employee/type/{code}', function (Request $request, Response $response, array $args) {
$code = $args['code'];
return $response->withStatus(200)
->withHeader('Content-Type', 'application/json')
->write(json_encode($this->employeeApplication->getIdEmployeeTypeByCode($code)));
});