Sha256: 81172c2bcb19daa1b53fb4726b4c3c23a53fa9604ca80cf201774881608c2e5f

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

module Api
  module V1
    class RegistrationsController < ActionController::API

      include Usman::ApiHelper

      def register
        proc_code = Proc.new do
          @reg_data = Usman::MobileRegistrationService.new(params)
          @errors = @reg_data.errors
          @success = false
          if @errors[:heading].blank?
            @success = true
            @alert = {
              heading: I18n.translate("mobile_registration.otp_sent.heading"),
              message: I18n.translate("mobile_registration.otp_sent.message")
            }
            @data = {
                      registration: @reg_data.registration,
                      device: @reg_data.device
                    }
          end
        end
        render_json_response(proc_code)
      end

      def resend_otp
        proc_code = Proc.new do
        end
        render_json_response(proc_code)
      end

      def verify
        proc_code = Proc.new do
        end
        render_json_response(proc_code)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
usman-0.2.0 app/controllers/api/v1/registrations_controller.rb