api-erstellen #1

Merged
TorstenHettstedt merged 52 commits from api-erstellen into master 2021-04-07 13:00:46 +02:00
Showing only changes of commit 3e2865dbe7 - Show all commits
1
@@ -69,13 +69,17 @@ class WorkingHoursController
* *
* @return Response * @return Response
* *
* @throws Exception * @throws HttpInternalServerErrorException
* @noinspection PhpUnusedParameterInspection * @noinspection PhpUnusedParameterInspection
*/ */
public function browse(Request $request, Response $response, array $args): Response public function browse(Request $request, Response $response, array $args): Response
{ {
$repository = new WorkingHoursRepository($this->databases); $repository = new WorkingHoursRepository($this->databases);
try {
return $this->printResponse($response, $repository->findAll(), StatusCodeInterface::STATUS_OK); return $this->printResponse($response, $repository->findAll(), StatusCodeInterface::STATUS_OK);
} catch (Exception $exception) {
TorstenHettstedt marked this conversation as resolved Outdated
Outdated
Review

Der Fehler kann abgefangen werden, ähnlich read()

Der Fehler kann abgefangen werden, ähnlich `read()`
throw new HttpInternalServerErrorException($request, 'Der Wert für das Datum oder die Zeit ist falsch in der Datenbank', $exception);
}
} }
/** /**