glitch-social/app/controllers/oauth/applications_controller.rb

19 lines
424 B
Ruby
Raw Normal View History

2016-03-14 16:49:13 +00:00
class Oauth::ApplicationsController < Doorkeeper::ApplicationsController
2016-08-17 16:56:23 +01:00
before_action :authenticate_user!
2016-03-14 16:49:13 +00:00
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