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