Commit 6b532313 authored by Mark Harding's avatar Mark Harding

(fix): do not show suggestions to logged out users

parent 0e9537b5
No related merge requests found
Pipeline #77820784 waiting for manual action with stages
in 12 minutes and 28 seconds
......@@ -16,6 +16,13 @@ class suggestions implements Interfaces\Api
$type = $pages[0] ?? 'user';
$loggedInUser = Core\Session::getLoggedinUser();
if (!$loggedInUser) {
return Factory::response([
'status' => 'error',
'message' => 'You must be logged in to receive suggestions',
]);
}
if ($loggedInUser->getSubscriptionsCount() >= 5000) {
return Factory::response([
'status' => 'error',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment