mirror of
https://github.com/flarum/framework.git
synced 2025-02-27 05:28:38 +08:00
Add the parsedBody to API request input
This commit is contained in:
parent
c74b3434e7
commit
5fa7a8c555
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user