Add the parsedBody to API request input

This commit is contained in:
Toby Zerner 2015-08-04 21:22:34 +09:30
parent c74b3434e7
commit 5fa7a8c555
2 changed files with 14 additions and 2 deletions

View File

@ -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);

View File

@ -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);