]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseApi.php
We now offer an endpoint for featured posts
[friendica.git] / src / Module / BaseApi.php
index 61f83130dd67398e4654a298d0a299a561add213..b6824140db632ab8b73afbff30f0042baf6af2ea 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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: