]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Mastodon/Tags/Unfollow.php
Move jsonError out of Factory\Api\Mastodon\Error->UnprocessableEntity
[friendica.git] / src / Module / Api / Mastodon / Tags / Unfollow.php
index 02847f1fd2f1ed752d91fced2707447237e91871..07b93d95a2dedc8c2cf3a4feb752f5445f556235 100644 (file)
@@ -33,11 +33,11 @@ class Unfollow extends BaseApi
 {
        protected function post(array $request = [])
        {
-               self::checkAllowedScope(self::SCOPE_WRITE);
+               $this->checkAllowedScope(self::SCOPE_WRITE);
                $uid = self::getCurrentUserID();
 
                if (empty($this->parameters['hashtag'])) {
-                       DI::mstdnError()->UnprocessableEntity();
+                       $this->logErrorAndJsonExit(422, $this->errorFactory->UnprocessableEntity());
                }
 
                $term = ['uid' => $uid, 'term' => '#' . ltrim($this->parameters['hashtag'], '#')];