forked from mirror/pixelfed
Update HashtagFollowerController, add getTags api method
This commit is contained in:
parent
9805cd841f
commit
869360a744
1 changed files with 11 additions and 0 deletions
|
@ -47,4 +47,15 @@ class HashtagFollowController extends Controller
|
|||
'state' => $state
|
||||
];
|
||||
}
|
||||
|
||||
public function getTags(Request $request)
|
||||
{
|
||||
return HashtagFollow::with('hashtag')->whereUserId(Auth::id())
|
||||
->inRandomOrder()
|
||||
->take(3)
|
||||
->get()
|
||||
->map(function($follow, $k) {
|
||||
return $follow->hashtag->name;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue