[add] Sending new work day data to backend

This commit is contained in:
2018-08-14 00:26:25 -06:00
parent e9f80a9989
commit 93099d316f
4 changed files with 53 additions and 1 deletions

View File

@@ -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)));
});