mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-25 17:26:43 +00:00
Update DiscoverController, fixes #2009
This commit is contained in:
parent
e313f2735b
commit
b04c7170d7
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,9 @@ class DiscoverController extends Controller
|
||||||
{
|
{
|
||||||
abort_if(!config('instance.discover.tags.is_public') && !Auth::check(), 403);
|
abort_if(!config('instance.discover.tags.is_public') && !Auth::check(), 403);
|
||||||
|
|
||||||
$tag = Hashtag::whereSlug($hashtag)->firstOrFail();
|
$tag = Hashtag::whereName($hashtag)
|
||||||
|
->orWhere('slug', $hashtag)
|
||||||
|
->firstOrFail();
|
||||||
$tagCount = StatusHashtagService::count($tag->id);
|
$tagCount = StatusHashtagService::count($tag->id);
|
||||||
return view('discover.tags.show', compact('tag', 'tagCount'));
|
return view('discover.tags.show', compact('tag', 'tagCount'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue