Added suggestions page Updated SuggestionsController with unlimited param

• Added:
- suggestions page in app

• Updated:
- SuggestionsController with unlimited param to show max 80 items
This commit is contained in:
mgabdev
2020-09-10 16:21:20 -05:00
parent d1d6124ffc
commit d3355f8bd5
5 changed files with 78 additions and 4 deletions

View File

@@ -12,7 +12,8 @@ class Api::V1::SuggestionsController < Api::BaseController
type = params[:type]
if type == 'related'
@accounts = PotentialFriendshipTracker.get(current_account.id)
count = truthy_param?(:unlimited) ? 80 : 10
@accounts = PotentialFriendshipTracker.get(current_account.id, limit: count)
render json: @accounts, each_serializer: REST::AccountSerializer
elsif type == 'verified'
@accounts = VerifiedSuggestions.get(current_account.id)