mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
403 B
20 lines
403 B
# frozen_string_literal: true
|
|
|
|
class NewslettersController < ApplicationController
|
|
def show; end
|
|
|
|
def update
|
|
Faraday.post(Docuseal::NEWSLETTER_URL, newsletter_params.to_json, 'Content-Type' => 'application/json')
|
|
rescue StandardError => e
|
|
Rails.logger.error(e)
|
|
ensure
|
|
redirect_to root_path
|
|
end
|
|
|
|
private
|
|
|
|
def newsletter_params
|
|
params.require(:user).permit(:email)
|
|
end
|
|
end
|