]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Mastodon/Mutes.php
Move jsonError out of Factory\Api\Mastodon\Error->UnprocessableEntity
[friendica.git] / src / Module / Api / Mastodon / Mutes.php
index 2190c397cc10948f225d4fbc3e52c7c468e4fc19..6557b770b8470e87c10e1d309d522398ed445b35 100644 (file)
@@ -36,16 +36,16 @@ class Mutes extends BaseApi
         */
        protected function rawContent(array $request = [])
        {
-               self::checkAllowedScope(self::SCOPE_READ);
+               $this->checkAllowedScope(self::SCOPE_READ);
                $uid = self::getCurrentUserID();
 
                if (empty($this->parameters['id'])) {
-                       DI::mstdnError()->UnprocessableEntity();
+                       $this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity());
                }
 
                $id = $this->parameters['id'];
                if (!DBA::exists('contact', ['id' => $id, 'uid' => 0])) {
-                       DI::mstdnError()->RecordNotFound();
+                       $this->logErrorAndJsonExit(404, $this->errorFactory->RecordNotFound());
                }
 
                $request = $this->getRequest([
@@ -85,6 +85,6 @@ class Mutes extends BaseApi
                }
 
                self::setLinkHeader();
-               System::jsonExit($accounts);
+               $this->jsonExit($accounts);
        }
 }