diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-15 12:38:28 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-10-15 12:38:28 +0200 |
commit | 70ab6624f5f397ddd05136db2fa37c902f0867eb (patch) | |
tree | 72407fd4b5368d3e8cdfd4c85ae928a654d8d261 /app/controllers/api/v1/accounts_controller.rb | |
parent | 91144d46ecc1a6e2d39abe8bea2d62c5cb57aca3 (diff) | |
parent | 4d336ceface783c255e62220cfa76812630ff1a1 (diff) |
Merge branch 'feature-suggestions' into development
Diffstat (limited to 'app/controllers/api/v1/accounts_controller.rb')
-rw-r--r-- | app/controllers/api/v1/accounts_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |