mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 04:33:47 +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);
|
||||
$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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user