Use Args::getMethod() at various places
This commit is contained in:
@@ -82,7 +82,7 @@ class BaseApi extends BaseModule
|
||||
public function run(array $request = [], bool $scopecheck = true): ResponseInterface
|
||||
{
|
||||
if ($scopecheck) {
|
||||
switch ($this->server['REQUEST_METHOD'] ?? Router::GET) {
|
||||
switch ($this->args->getMethod()) {
|
||||
case Router::DELETE:
|
||||
case Router::PATCH:
|
||||
case Router::POST:
|
||||
|
||||
@@ -89,7 +89,7 @@ class HTTPException
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' ' . $e->getCode() . ' ' . $e->getDescription());
|
||||
|
||||
if ($e->getCode() >= 400) {
|
||||
Logger::debug('Exit with error', ['code' => $e->getCode(), 'description' => $e->getDescription(), 'query' => DI::args()->getQueryString(), 'callstack' => System::callstack(20), 'method' => $_SERVER['REQUEST_METHOD'], 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']);
|
||||
Logger::debug('Exit with error', ['code' => $e->getCode(), 'description' => $e->getDescription(), 'query' => DI::args()->getQueryString(), 'callstack' => System::callstack(20), 'method' => DI::args()->getMethod(), 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '']);
|
||||
}
|
||||
|
||||
$tpl = Renderer::getMarkupTemplate('exception.tpl');
|
||||
|
||||
Reference in New Issue
Block a user