Merge branch 'pre_trustie_server' into trustie_server

This commit is contained in:
yystopf 2023-01-13 12:03:08 +08:00
commit b64aef9494
1 changed files with 5 additions and 0 deletions

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