app/controllers/doorkeeper/applications_controller.rb in doorkeeper-5.1.0 vs app/controllers/doorkeeper/applications_controller.rb in doorkeeper-5.1.1
- old
+ new
@@ -17,11 +17,11 @@
end
def show
respond_to do |format|
format.html
- format.json { render json: @application }
+ format.json { render json: @application, as_owner: true }
end
end
def new
@application = Application.new
@@ -33,11 +33,11 @@
if @application.save
flash[:notice] = I18n.t(:notice, scope: %i[doorkeeper flash applications create])
respond_to do |format|
format.html { redirect_to oauth_application_url(@application) }
- format.json { render json: @application }
+ format.json { render json: @application, as_owner: true }
end
else
respond_to do |format|
format.html { render :new }
format.json do
@@ -55,10 +55,10 @@
if @application.update(application_params)
flash[:notice] = I18n.t(:notice, scope: i18n_scope(:update))
respond_to do |format|
format.html { redirect_to oauth_application_url(@application) }
- format.json { render json: @application }
+ format.json { render json: @application, as_owner: true }
end
else
respond_to do |format|
format.html { render :edit }
format.json do