about summary refs log tree commit diff
path: root/app/controllers/oauth/applications_controller.rb
blob: 4614ef2f75193f9f44f70931400d0a104eea4da6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
  before_filter :authenticate_user!

  def index
    @applications = current_user.oauth_applications
  end

  def create
    @application = Doorkeeper::Application.new(application_params)
    @application.owner = current_user

    if @application.save
      redirect_to oauth_application_url(@application)
    else
      render :new
    end
  end
end