From e21a3fe0cd91dfeae76bce4d58c7611e78b60fbf Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 14 Oct 2016 23:10:07 +0200 Subject: Adding sync of follow relationships to Neo4J, accounts/suggestions API --- app/controllers/api/v1/accounts_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 930f60cc3..7757fd7f8 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -1,6 +1,6 @@ class Api::V1::AccountsController < ApiController before_action :doorkeeper_authorize! - before_action :set_account, except: :verify_credentials + before_action :set_account, except: [:verify_credentials, :suggestions] respond_to :json def show @@ -19,6 +19,10 @@ class Api::V1::AccountsController < ApiController @followers = @account.followers end + def suggestions + @accounts = FollowSuggestion.get(current_user.account_id) + end + def statuses @statuses = @account.statuses.with_includes.with_counters.paginate_by_max_id(20, params[:max_id], params[:since_id]).to_a end -- cgit