Commit 6da97336 authored by JB Vasseur's avatar JB Vasseur

Use ApplicationsFinder !22296

parent deeeffe0
...@@ -6,11 +6,9 @@ class Admin::ApplicationsController < Admin::ApplicationController ...@@ -6,11 +6,9 @@ class Admin::ApplicationsController < Admin::ApplicationController
before_action :set_application, only: [:show, :edit, :update, :destroy] before_action :set_application, only: [:show, :edit, :update, :destroy]
before_action :load_scopes, only: [:new, :create, :edit, :update] before_action :load_scopes, only: [:new, :create, :edit, :update]
# rubocop: disable CodeReuse/ActiveRecord
def index def index
@applications = Doorkeeper::Application.where("owner_id IS NULL") @applications = ApplicationsFinder.new.execute
end end
# rubocop: enable CodeReuse/ActiveRecord
def show def show
end end
...@@ -49,11 +47,9 @@ class Admin::ApplicationsController < Admin::ApplicationController ...@@ -49,11 +47,9 @@ class Admin::ApplicationsController < Admin::ApplicationController
private private
# rubocop: disable CodeReuse/ActiveRecord
def set_application def set_application
@application = Doorkeeper::Application.where("owner_id IS NULL").find(params[:id]) @application = ApplicationsFinder.new({ id: params[:id] }).execute
end end
# rubocop: enable CodeReuse/ActiveRecord
# Only allow a trusted parameter "white list" through. # Only allow a trusted parameter "white list" through.
def application_params def application_params
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment