修复:更改用户通知邮箱只能自己改自己的
This commit is contained in:
parent
cfdbc5a682
commit
3f7366fbcd
|
@ -26,7 +26,7 @@ class Api::V1::Users::UpdateEmailService < ApplicationService
|
|||
raise Error, "验证码不正确." if @verify_code&.code != @code && !is_debug
|
||||
raise Error, "验证码已失效." if !@verify_code&.effective? && !is_debug
|
||||
|
||||
# begin
|
||||
begin
|
||||
ActiveRecord::Base.transaction do
|
||||
change_user_email
|
||||
excute_data_to_gitea
|
||||
|
@ -35,15 +35,15 @@ class Api::V1::Users::UpdateEmailService < ApplicationService
|
|||
|
||||
return gitea_data
|
||||
|
||||
# rescue
|
||||
# raise Error, "服务器错误,请联系系统管理员!"
|
||||
# end
|
||||
rescue
|
||||
raise Error, "服务器错误,请联系系统管理员!"
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def request_params
|
||||
{
|
||||
access_token: token
|
||||
access_token: @user.gitea_token
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue