mirror of
https://github.com/flarum/core.git
synced 2025-07-21 08:41:17 +02:00
Add the parsedBody to API request input
This commit is contained in:
@@ -349,7 +349,13 @@ class ApiServiceProvider extends ServiceProvider
|
|||||||
$action = app($class);
|
$action = app($class);
|
||||||
$actor = app('flarum.actor');
|
$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);
|
$request = new Request($input, $actor, $httpRequest);
|
||||||
|
|
||||||
return $action->handle($request);
|
return $action->handle($request);
|
||||||
|
@@ -50,7 +50,13 @@ class RegisterApiRoutes
|
|||||||
$action = app($class);
|
$action = app($class);
|
||||||
$actor = app('flarum.actor');
|
$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);
|
$request = new Request($input, $actor, $httpRequest);
|
||||||
|
|
||||||
return $action->handle($request);
|
return $action->handle($request);
|
||||||
|
Reference in New Issue
Block a user