Commit 3fb8ab4d authored by Michael Kessler's avatar Michael Kessler
Browse files

[BUGFIX] Don't change action name on requests

parent 792af6d1
......@@ -156,20 +156,12 @@ abstract class AbstractRestMiddleware implements LoggerAwareInterface, Middlewar
}
/**
* Method returns the requested action for the rest controller. If no
* Method returns the requested action for the rest controller.
*
* @param $method
* @return string
*/
protected function getCallableActionName($method): string {
if ($method === 'POST') {
return 'post' . mb_strtoupper(mb_substr($this->pathSegments['verb'], 0, 1)) . mb_substr(
$this->pathSegments['verb'], 1
);
}
return 'get' . mb_strtoupper(mb_substr($this->pathSegments['verb'], 0, 1)) . mb_substr(
$this->pathSegments['verb'], 1
);
protected function getActionName(): string {
return $this->pathSegments['verb'];
}
/**
......
......@@ -96,7 +96,7 @@ class RestAuthenticator extends AbstractRestMiddleware {
$className = $this->getClassName();
$httpMethod = $request->getMethod();
$actionName = $this->getCallableActionName($httpMethod);
$actionName = $this->getActionName();
/**
* when the client requests a bearer token, we don't need to do access checks etc. the user verification is done by the AuthServices
......
......@@ -94,7 +94,7 @@ class RestDispatcher extends AbstractRestMiddleware {
$className = $this->getClassName();
$httpMethod = $request->getMethod();
$actionName = $this->getCallableActionName($httpMethod);
$actionName = $this->getActionName();
/** @var DataResolveService $dataResolveService */
$dataResolveService = GeneralUtility::makeInstance(DataResolveService::class);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment