mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 11:45:57 +08:00
Merge branch 'standalone_develop' into pre_trustie_server
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
class Api::V1::Users::UpdateEmailService < ApplicationService
|
||||
include ActiveModel::Model
|
||||
include AesCryptHelper
|
||||
|
||||
attr_reader :user, :token, :password, :mail, :old_mail, :code, :verify_code
|
||||
attr_accessor :gitea_data
|
||||
@@ -10,7 +11,7 @@ class Api::V1::Users::UpdateEmailService < ApplicationService
|
||||
def initialize(user, params, token =nil)
|
||||
@user = user
|
||||
@token = token
|
||||
@password = params[:password]
|
||||
@password = decrypt(params[:password]) rescue ""
|
||||
@mail = params[:email]
|
||||
@old_mail = user.mail
|
||||
@code = params[:code]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Api::V1::Users::UpdatePhoneService < ApplicationService
|
||||
include ActiveModel::Model
|
||||
include AesCryptHelper
|
||||
|
||||
attr_reader :user, :password, :phone, :code, :verify_code
|
||||
|
||||
@@ -8,7 +9,7 @@ class Api::V1::Users::UpdatePhoneService < ApplicationService
|
||||
|
||||
def initialize(user, params)
|
||||
@user = user
|
||||
@password = params[:password]
|
||||
@password = decrypt(params[:password]) rescue ""
|
||||
@phone = params[:phone]
|
||||
@code = params[:code]
|
||||
@verify_code = VerificationCode.where(phone: @phone, code_type: 4).last
|
||||
|
||||
Reference in New Issue
Block a user