From 6d7290f47c11c08b55d6066d5123b8b9f04cf0bc Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 2 Oct 2016 16:14:21 +0200 Subject: Add API for getting info about authenticated user: /api/v1/accounts/verify_credentials --- app/controllers/api/v1/accounts_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 50e6df80e..d43306f7b 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -1,11 +1,16 @@ class Api::V1::AccountsController < ApiController before_action :doorkeeper_authorize! - before_action :set_account + before_action :set_account, except: :verify_credentials respond_to :json def show end + def verify_credentials + @account = current_user.account + render action: :show + end + def following @following = @account.following end -- cgit