|
|
|
@ -37,13 +37,9 @@ class Users::ApplyProfessionalAuthService < ApplicationService
|
|
|
|
|
user.apply_user_authentication.create!(auth_type: 2, status: 0)
|
|
|
|
|
|
|
|
|
|
move_image_file! unless params[:upload_image].to_s == 'false'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
sms_cache = Rails.cache.read("apply_pro_certification")
|
|
|
|
|
if sms_cache.nil?
|
|
|
|
|
sms_notify_admin
|
|
|
|
|
Rails.cache.write("apply_pro_certification", 1, expires_in: 5.minutes)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
@ -61,7 +57,11 @@ class Users::ApplyProfessionalAuthService < ApplicationService
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def sms_notify_admin
|
|
|
|
|
sms_cache = Rails.cache.read('apply_pro_certification')
|
|
|
|
|
if sms_cache.nil?
|
|
|
|
|
Educoder::Sms.notify_admin(send_type: 'apply_pro_certification')
|
|
|
|
|
Rails.cache.write('apply_pro_certification', 1, expires_in: 5.minutes)
|
|
|
|
|
end
|
|
|
|
|
rescue => ex
|
|
|
|
|
Util.logger_error(ex)
|
|
|
|
|
end
|
|
|
|
|