add emails for newsletter

This commit is contained in:
2023-05-01 15:11:01 +03:30
parent 0797f9798d
commit 6c358e757a
12 changed files with 77 additions and 5 deletions

View File

@ -0,0 +1,15 @@
class EmailController < ApplicationController
skip_before_action :verify_authenticity_token
def index
end
def create
@email = Email.create(message_params)
render json: {}, status: :created
end
private
def message_params
params.permit(:email)
end
end