[add] Update to the person table

This commit is contained in:
2018-08-06 03:15:28 -06:00
parent 4a8df33184
commit 63a7186464
2 changed files with 127 additions and 3 deletions

View File

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