This repository has been archived on 2019-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/controllers/oauth/applications_controller.rb
2016-03-14 17:49:13 +01:00

19 lines
424 B
Ruby

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