1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 16:53:17 +00:00

Update HashtagFollowerController, add getTags api method

This commit is contained in:
Daniel Supernault 2019-07-08 21:46:32 -06:00
parent 9805cd841f
commit 869360a744
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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;
});
}
}