summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/emails_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/emails_controller.rb')
-rw-r--r--app/controllers/profiles/emails_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb
index ddb67d1c4d1..97db84b92d4 100644
--- a/app/controllers/profiles/emails_controller.rb
+++ b/app/controllers/profiles/emails_controller.rb
@@ -5,7 +5,7 @@ class Profiles::EmailsController < Profiles::ApplicationController
end
def create
- @email = Emails::CreateService.new(current_user, email_params).execute
+ @email = Emails::CreateService.new(current_user, email_params.merge(user: current_user)).execute
if @email.errors.blank?
NotificationService.new.new_email(@email)
@@ -19,7 +19,7 @@ class Profiles::EmailsController < Profiles::ApplicationController
def destroy
@email = current_user.emails.find(params[:id])
- Emails::DestroyService.new(current_user, email: @email.email).execute
+ Emails::DestroyService.new(current_user, user: current_user, email: @email.email).execute
respond_to do |format|
format.html { redirect_to profile_emails_url, status: 302 }