Browse Source

Merge branch 'standalone_develop' into pre_trustie_server

pull/327/head
yystopf 3 years ago
parent
commit
2bd50bdc92
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      app/services/api/v1/users/update_email_service.rb

+ 5
- 0
app/services/api/v1/users/update_email_service.rb View File

@@ -31,6 +31,7 @@ class Api::V1::Users::UpdateEmailService < ApplicationService
change_user_email
excute_data_to_gitea
excute_change_email_from_gitea
remove_old_cache_for_user
end

return gitea_data
@@ -68,4 +69,8 @@ class Api::V1::Users::UpdateEmailService < ApplicationService
$gitea_client.delete_user_emails({body: {emails: [@old_mail]}.to_json, query: request_params})
$gitea_client.post_user_emails({body: {emails: [@mail]}.to_json, query: request_params})
end

def remove_old_cache_for_user
$redis_cache.del("v2-owner-common:#{@user.login}-#{@old_mail}")
end
end

Loading…
Cancel
Save