diff options
author | James Lopez <james@jameslopez.es> | 2017-06-16 11:29:43 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-06-23 12:41:41 +0300 |
commit | bf3a3f3652704fb261e6220e2199830ea22ec8d3 (patch) | |
tree | b23c8967fecea041bd01c7065676ef33dd9b385c /lib/api/users.rb | |
parent | 36bc2e9016b5c27e6a7afbb78235b5006d3bc9cc (diff) |
fix api and controller issues
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 733b65b1c8e..ba59818ba84 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -277,7 +277,10 @@ module API not_found!('Email') unless email email.destroy - user.update_secondary_emails! + + Users::UpdateService.new(current_user, user).execute do |user| + user.update_secondary_emails! + end end desc 'Delete a user. Available only for admins.' do @@ -508,7 +511,9 @@ module API not_found!('Email') unless email email.destroy - current_user.update_secondary_emails! + Users::UpdateService.new(current_user, user).execute do |user| + user.update_secondary_emails! + end end desc 'Get a list of user activities' |