diff options
author | James Lopez <james@jameslopez.es> | 2017-09-27 16:39:10 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-09-28 08:46:39 +0200 |
commit | 1dcb7111107ed5a6b6258613d804b8da56af8b35 (patch) | |
tree | ccd463f601f4fada16e95dfc57796850aa1b85e7 /app/controllers/profiles | |
parent | e07819cbf70511ad38c107dc593ec87606567cdc (diff) | |
download | gitlab-ce-1dcb7111107ed5a6b6258613d804b8da56af8b35.tar.gz |
refactor emails servicerefactor-services
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r-- | app/controllers/profiles/emails_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb index 8328d230276..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, 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, 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 } |