akkounts/app/controllers/admin/settings/services_controller.rb

20 lines
423 B
Ruby

class Admin::Settings::ServicesController < Admin::SettingsController
def index
@service = params[:s]
if @service.blank?
redirect_to admin_settings_services_path(params: { s: "discourse" })
end
end
def create
service = params.require(:service)
update_settings
redirect_to admin_settings_services_path(params: { s: service }), flash: {
success: "Settings saved"
}
end
end