summaryrefslogtreecommitdiff
path: root/app/controllers/profiles
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-06-19 10:04:14 +0200
committerJames Lopez <james@jameslopez.es>2017-06-23 11:41:42 +0200
commit3bab585bec5529c06ba4b0c4ae7e953b99edf6d3 (patch)
tree2751c7f6bc3959204dbf5fb90d42f56c773650c6 /app/controllers/profiles
parentad44af2faaaa872ee30922699f66ac78fa402336 (diff)
downloadgitlab-ce-3bab585bec5529c06ba4b0c4ae7e953b99edf6d3.tar.gz
update to use emails destroy service
Diffstat (limited to 'app/controllers/profiles')
-rw-r--r--app/controllers/profiles/emails_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb
index b68ae3b0843..9159c217f1b 100644
--- a/app/controllers/profiles/emails_controller.rb
+++ b/app/controllers/profiles/emails_controller.rb
@@ -18,7 +18,7 @@ class Profiles::EmailsController < Profiles::ApplicationController
def destroy
@email = current_user.emails.find(params[:id])
- @email.destroy
+ Emails::DestroyService.new(self, self, email: @email.email).execute
Users::UpdateService.new(current_user, current_user).execute { |user| user.update_secondary_emails! }