From f9aaadf3f65a2b6383bc3929235cf86c13e6054e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Mon, 28 Aug 2023 22:06:35 +0000 Subject: [PATCH] update --- Controller/ApiController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0921dee..caca419 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -98,7 +98,7 @@ final class ApiController extends Controller $investment = new Investment(); $investment->name = $request->getDataString('name') ?? ''; $investment->description = $request->getDataString('description') ?? ''; - $investment->status = (int) ($request->getDataInt('status') ?? InvestmentStatus::DRAFT); + $investment->status = $request->getDataInt('status') ?? InvestmentStatus::DRAFT; //$investment->type = new NullBaseStringL11nType((int) ($request->getDataInt('type') ?? 0)); $investment->description = $request->getDataString('description') ?? ''; $investment->unit = $request->getDataInt('unit') ?? $this->app->unitId; @@ -258,7 +258,7 @@ final class ApiController extends Controller virtualPath: $path, pathSettings: PathSettings::FILE_PATH, hasAccountRelation: false, - readContent: (bool) ($request->getData('parse_content') ?? false) + readContent: $request->getDataBool('parse_content') ?? false ); $collection = null; @@ -706,7 +706,7 @@ final class ApiController extends Controller virtualPath: $path, pathSettings: PathSettings::FILE_PATH, hasAccountRelation: false, - readContent: (bool) ($request->getData('parse_content') ?? false) + readContent: $request->getDataBool('parse_content') ?? false ); $collection = null;