X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FApi%2FMastodon%2FTags%2FUnfollow.php;h=07b93d95a2dedc8c2cf3a4feb752f5445f556235;hb=7486ebdc10715b7204b70ce262052d28cb61c69e;hp=06b08b7c3d1130bb80a048a1977d312bfcae2263;hpb=4faf08c0643d3e6bbe2a0a77be2ff8c1dbea4d5c;p=friendica.git diff --git a/src/Module/Api/Mastodon/Tags/Unfollow.php b/src/Module/Api/Mastodon/Tags/Unfollow.php index 06b08b7c3d..07b93d95a2 100644 --- a/src/Module/Api/Mastodon/Tags/Unfollow.php +++ b/src/Module/Api/Mastodon/Tags/Unfollow.php @@ -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'], '#')]; @@ -45,6 +45,6 @@ class Unfollow extends BaseApi DBA::delete('search', $term); $hashtag = new \Friendica\Object\Api\Mastodon\Tag($this->baseUrl, ['name' => ltrim($this->parameters['hashtag'])], [], false); - System::jsonExit($hashtag->toArray()); + $this->jsonExit($hashtag->toArray()); } }