[add] Basic endpoint for workday data

This commit is contained in:
2018-08-14 11:52:57 -06:00
parent f864e74247
commit 03cbcce59f
2 changed files with 41 additions and 28 deletions

View File

@@ -111,4 +111,13 @@ $app->get('/api/employee/salary/{code}', function (Request $request, Response $r
return $response->withStatus(200)
->withHeader('Content-Type', 'application/json')
->write(json_encode($this->employeeApplication->calculateSalaryByCode($code)));
});
});
$app->get('/api/employee/salary/date/{date}/code/{code}', function (Request $request, Response $response, array $args) {
$date = $args['date'];
$code = $args['code'];
return $response->withStatus(200)
->withHeader('Content-Type', 'application/json')
->write(json_encode($this->employeeApplication->getDataWorkDayByDateAndCode($date, $code)));
});