usman 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1683294850671aa038a812e0ec0db53d311fe9a3
|
4
|
+
data.tar.gz: 78c95f8cab989f6984eb5caddce13e78e4cfe343
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b261d5cbeec010e92f640ecf7832031b9f154954a096e2318fdecd71dcb200ee29c80522c2993f1d2330009db2b828c1860231ef80c9f6dd824dbfd7bcdc532
|
7
|
+
data.tar.gz: afb07b42ad4ad871631f4d9e9bb8f521de71172d9cb4bf8bf8ac6bca9e353a4a0048e28a23e4153bb5c77d2cbc4a04f9ed5aca611f48513cd9bd410801d5fdb0
|
@@ -102,10 +102,29 @@ module Usman
|
|
102
102
|
message: I18n.translate("api.verify_otp.verification_success.message")
|
103
103
|
}
|
104
104
|
if @device.verified? && @device.tac_accepted?
|
105
|
-
@data = { api_token: @device.api_token }
|
105
|
+
@data = { api_token: @device.api_token }
|
106
106
|
else
|
107
107
|
@data = { api_token: "" }
|
108
108
|
end
|
109
|
+
@data[:registration] = @registration
|
110
|
+
user = @registration.user
|
111
|
+
if user
|
112
|
+
@data[:profile] = {
|
113
|
+
id: user.id,
|
114
|
+
name: user.name,
|
115
|
+
gender: user.gender,
|
116
|
+
email: user.email,
|
117
|
+
date_of_birth: user.date_of_birth
|
118
|
+
}
|
119
|
+
else
|
120
|
+
@data[:profile] = {
|
121
|
+
id: "",
|
122
|
+
name: "",
|
123
|
+
gender: "",
|
124
|
+
email: "",
|
125
|
+
date_of_birth: ""
|
126
|
+
}
|
127
|
+
end
|
109
128
|
else
|
110
129
|
@success = false
|
111
130
|
@errors = {
|
@@ -18,7 +18,25 @@ api_output = <<-eos
|
|
18
18
|
"heading": "OTP was verified succesfully",
|
19
19
|
"message": "You may need to accept the terms and conditions to get the API token if you have not yet finised the registration"
|
20
20
|
},
|
21
|
-
"data": {
|
21
|
+
"data": {
|
22
|
+
"api_token": "",
|
23
|
+
"registration": {
|
24
|
+
"id": 4,
|
25
|
+
"user_id": "",
|
26
|
+
"country_id": 1,
|
27
|
+
"city_id": "",
|
28
|
+
"dialing_prefix": "+91",
|
29
|
+
"mobile_number": "192837465",
|
30
|
+
"status": "verified"
|
31
|
+
},
|
32
|
+
"profile": {
|
33
|
+
"id": "",
|
34
|
+
"name": "",
|
35
|
+
"gender": "",
|
36
|
+
"email": "",
|
37
|
+
"date_of_birth": ""
|
38
|
+
}
|
39
|
+
}
|
22
40
|
}
|
23
41
|
eos
|
24
42
|
|
@@ -19,8 +19,24 @@ api_output = <<-eos
|
|
19
19
|
"message": "You may need to accept the terms and conditions to get the API token if you have not yet finised the registration"
|
20
20
|
},
|
21
21
|
"data": {
|
22
|
-
"api_token": "
|
23
|
-
|
22
|
+
"api_token": "22431f28189e2c88ba58ee221f373931",
|
23
|
+
"registration": {
|
24
|
+
"id": 4,
|
25
|
+
"user_id": "12",
|
26
|
+
"country_id": 1,
|
27
|
+
"city_id": "",
|
28
|
+
"dialing_prefix": "+91",
|
29
|
+
"mobile_number": "192837465",
|
30
|
+
"status": "verified"
|
31
|
+
},
|
32
|
+
"profile": {
|
33
|
+
"id": 12,
|
34
|
+
"name": "Some Name",
|
35
|
+
"gender": "Male",
|
36
|
+
"email": "asd@asd.com",
|
37
|
+
"date_of_birth": "10/10/1980"
|
38
|
+
}
|
39
|
+
}
|
24
40
|
}
|
25
41
|
eos
|
26
42
|
|
data/lib/usman/version.rb
CHANGED