mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
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