1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-18 22:09:46 +00:00

style(rubocop): fix all safe auto correctable offenses

هذا الالتزام موجود في:
Charlie Smurthwaite
2023-03-16 15:50:53 +00:00
الأصل 02c93a4850
التزام fd289c46fd
204 ملفات معدلة مع 2611 إضافات و2486 حذوفات

عرض الملف

@@ -1,4 +1,5 @@
class WebhooksController < ApplicationController
include WithinOrganization
before_action { @server = organization.servers.present.find_by_permalink!(params[:server_id]) }
before_action { params[:id] && @webhook = @server.webhooks.find_by_uuid!(params[:id]) }
@@ -8,7 +9,7 @@ class WebhooksController < ApplicationController
end
def new
@webhook = @server.webhooks.build(:all_events => true)
@webhook = @server.webhooks.build(all_events: true)
end
def create
@@ -16,7 +17,7 @@ class WebhooksController < ApplicationController
if @webhook.save
redirect_to_with_json [organization, @server, :webhooks]
else
render_form_errors 'new', @webhook
render_form_errors "new", @webhook
end
end
@@ -24,7 +25,7 @@ class WebhooksController < ApplicationController
if @webhook.update(safe_params)
redirect_to_with_json [organization, @server, :webhooks]
else
render_form_errors 'edit', @webhook
render_form_errors "edit", @webhook
end
end
@@ -45,7 +46,7 @@ class WebhooksController < ApplicationController
private
def safe_params
params.require(:webhook).permit(:name, :url, :all_events, :enabled, :events => [])
params.require(:webhook).permit(:name, :url, :all_events, :enabled, events: [])
end
end