Skip to content
Snippets Groups Projects
Commit 13ee8892 authored by Eugen Rochko's avatar Eugen Rochko
Browse files

Increase default number of loaded suggestions to 10

parent f0f791bb
No related branches found
No related tags found
No related merge requests found
class FollowSuggestion class FollowSuggestion
def self.get(for_account_id, limit = 6) def self.get(for_account_id, limit = 10)
neo = Neography::Rest.new neo = Neography::Rest.new
query = <<END query = <<END
...@@ -14,7 +14,7 @@ END ...@@ -14,7 +14,7 @@ END
results = neo.execute_query(query, id: for_account_id, limit: limit) results = neo.execute_query(query, id: for_account_id, limit: limit)
if results.empty? if results.empty? || results['data'].empty?
results = fallback(for_account_id, limit) results = fallback(for_account_id, limit)
elsif results['data'].size < limit elsif results['data'].size < limit
results['data'] = (results['data'] + fallback(for_account_id, limit - results['data'].size)['data']).uniq results['data'] = (results['data'] + fallback(for_account_id, limit - results['data'].size)['data']).uniq
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment