Class: Api::V1::RegistrationsController
- Inherits:
-
ActionController::API
- Object
- ActionController::API
- Api::V1::RegistrationsController
show all
- Includes:
- Usman::ApiHelper
- Defined in:
- app/controllers/api/v1/registrations_controller.rb
Instance Method Summary
collapse
#current_user, #embed_stack_in_json_response?, #render_json_response, #require_admin_auth_token, #require_auth_token, #require_super_admin_auth_token
Instance Method Details
#register ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/controllers/api/v1/registrations_controller.rb', line 7
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
|
#resend_otp ⇒ Object
27
28
29
30
31
|
# File 'app/controllers/api/v1/registrations_controller.rb', line 27
def resend_otp
proc_code = Proc.new do
end
render_json_response(proc_code)
end
|
#verify ⇒ Object
33
34
35
36
37
|
# File 'app/controllers/api/v1/registrations_controller.rb', line 33
def verify
proc_code = Proc.new do
end
render_json_response(proc_code)
end
|