app/services/manager_management/login/multi_factor/authenticate.rb
# Send email for device verification if required
#
# * Author: Santhosh
# * Date: 29/09/2019
# * Reviewed By:
#
# @return [Result::Base]
#
Send email for device verification if required
Author: Santhosh
Date: 29/09/2019
Reviewed By.
Send email for device verification if required Author : Santhosh Date : 29 / 09 / 2019 Reviewed By .
def validate_and_send_device_verification_mail
          device = CacheManagement::ManagerDeviceById.new([@manager_device_id]).fetch[@manager_device_id]
          return unauthorized_access_response('mm_l_mf_a_7') if device.nil?
          @device_authorized = (device[:status] == GlobalConstant::ManagerDevice.authorized)
          BackgroundJob.enqueue(
              DeviceRegistrationJob,
              {
                  manager_id: @manager_obj.id,
                  manager_device_id: @manager_device_id
              }
          ) unless device[:status] == GlobalConstant::ManagerDevice.authorized
          success
        end
def validate_and_send_device_verification_mail device = CacheManagement :: ManagerDeviceById . new ( [ @manager_device_id ] ) . fetch [ @manager_device_id ] return unauthorized_access_response ( 'mm_l_mf_a_7' ) if device . nil? @device_authorized = ( device [ :status ] == GlobalConstant :: ManagerDevice . authorized ) BackgroundJob . enqueue ( DeviceRegistrationJob , { manager_id : @manager_obj . id , manager_device_id : @manager_device_id } ) unless device [ :status ] == GlobalConstant :: ManagerDevice . authorized success end
Send email for device verification if required
 Author: Santhosh
 Date: 29/09/2019
 Reviewed By:
Send email for device verification if required Author : Santhosh Date : 29 / 09 / 2019 Reviewed By :
None
Result::Base