diff --git a/framework/core/src/Api/ApiServiceProvider.php b/framework/core/src/Api/ApiServiceProvider.php index 4002bdd89..de8f2886b 100644 --- a/framework/core/src/Api/ApiServiceProvider.php +++ b/framework/core/src/Api/ApiServiceProvider.php @@ -349,7 +349,13 @@ class ApiServiceProvider extends ServiceProvider $action = app($class); $actor = app('flarum.actor'); - $input = array_merge($httpRequest->getQueryParams(), $httpRequest->getAttributes(), $routeParams); + $input = array_merge( + $httpRequest->getQueryParams(), + $httpRequest->getAttributes(), + $httpRequest->getParsedBody(), + $routeParams + ); + $request = new Request($input, $actor, $httpRequest); return $action->handle($request); diff --git a/framework/core/src/Events/RegisterApiRoutes.php b/framework/core/src/Events/RegisterApiRoutes.php index 206ce43c4..e5ecb4cb5 100644 --- a/framework/core/src/Events/RegisterApiRoutes.php +++ b/framework/core/src/Events/RegisterApiRoutes.php @@ -50,7 +50,13 @@ class RegisterApiRoutes $action = app($class); $actor = app('flarum.actor'); - $input = array_merge($httpRequest->getQueryParams(), $httpRequest->getAttributes(), $routeParams); + $input = array_merge( + $httpRequest->getQueryParams(), + $httpRequest->getAttributes(), + $httpRequest->getParsedBody(), + $routeParams + ); + $request = new Request($input, $actor, $httpRequest); return $action->handle($request);