Sha256: cfd2f760dac4b9615edefa6a4626a876ae3117c14e14f5e7ef4d2841d389246d

Contents?: true

Size: 590 Bytes

Versions: 3

Compression:

Stored size: 590 Bytes

Contents

class Api::ApiController < ActionController::Base
  include CamaleonHelper
  include SessionHelper
  include SiteHelper
  include HtmlHelper
  include UserRolesHelper
  include ShortCodeHelper
  include PluginsHelper
  include ThemeHelper
  include HooksHelper
  include ContentHelper
  include CaptchaHelper
  include UploaderHelper

  before_action -> { doorkeeper_authorize! :client }
  respond_to :json

  def account
    render json: current_resource_owner
  end

  private

  def current_resource_owner
    User.find(doorkeeper_token.resource_owner_id) if doorkeeper_token
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
camaleon_cms-1.0.7 app/controllers/api/api_controller.rb
camaleon_cms-1.0.6 app/controllers/api/api_controller.rb
camaleon_cms-1.0.5 app/controllers/api/api_controller.rb