usman 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/usman/api/v1/profile_controller.rb +1 -0
- data/app/controllers/usman/api/v1/registrations_controller.rb +7 -20
- data/app/serializers/registration_serializer.rb +1 -1
- data/app/views/usman/api/v1/docs/verify_otp/_pos_case_1.html.erb +1 -1
- data/app/views/usman/api/v1/docs/verify_otp/_pos_case_2.html.erb +1 -1
- data/config/locales/usman/api.ar.yml +1 -1
- data/config/locales/usman/api.en.yml +1 -1
- data/lib/usman/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01ac583f7b2db6539f7c30c806d1c706c63d0c90
|
4
|
+
data.tar.gz: 3fe75fd1f24555c3e8560f7e9568e22faf57e0d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aee20527bc3c9bd207f5f8e6a8c7bc449bfc0847bc82da46f5ab96fbc33922323c5128c57a444d6a51c7e18fafe67ce832cc5f836174848283ff46e588768373
|
7
|
+
data.tar.gz: 5a79998e67e318b8e7dbfe42358342d80a8cfde4800091a78d6eb4b5ef8554093fdfdd7f3611e3235c1c2d516490e11d3b87f9050278b385ee88019002c1c817
|
@@ -100,6 +100,7 @@ module Usman
|
|
100
100
|
@user = @current_user
|
101
101
|
@user.name = permitted_params[:name]
|
102
102
|
@user.gender = permitted_params[:gender]
|
103
|
+
@user.dummy = false
|
103
104
|
@user.date_of_birth = permitted_params[:date_of_birth]
|
104
105
|
@user.email = permitted_params[:email]
|
105
106
|
|
@@ -106,25 +106,8 @@ module Usman
|
|
106
106
|
else
|
107
107
|
@data = { api_token: "" }
|
108
108
|
end
|
109
|
-
@data[:registration] = @registration
|
110
|
-
|
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
|
+
@data[:registration] = ActiveModelSerializers::SerializableResource.new(@registration, serializer: RegistrationSerializer)
|
110
|
+
@data[:profile] = ActiveModelSerializers::SerializableResource.new(@registration.user, serializer: ProfileSerializer)
|
128
111
|
else
|
129
112
|
@success = false
|
130
113
|
@errors = {
|
@@ -186,7 +169,11 @@ module Usman
|
|
186
169
|
heading: I18n.translate("api.accept_tac.tac_accepted.heading"),
|
187
170
|
message: I18n.translate("api.accept_tac.tac_accepted.message")
|
188
171
|
}
|
189
|
-
|
172
|
+
if @device.verified? && @device.tac_accepted?
|
173
|
+
@data = { api_token: @device.api_token }
|
174
|
+
@data[:registration] = ActiveModelSerializers::SerializableResource.new(@registration, serializer: RegistrationSerializer)
|
175
|
+
@data[:profile] = ActiveModelSerializers::SerializableResource.new(@registration.user, serializer: ProfileSerializer)
|
176
|
+
end
|
190
177
|
else
|
191
178
|
@success = false
|
192
179
|
@errors = {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class RegistrationSerializer < ActiveModel::Serializer
|
2
2
|
include NullAttributeReplacer
|
3
3
|
|
4
|
-
attributes :id, :dialing_prefix, :mobile_number, :status
|
4
|
+
attributes :id, :dialing_prefix, :mobile_number, :status, :user_id, :country_id, :city_id
|
5
5
|
|
6
6
|
has_one :user, class_name: "User", serializer: ProfileSerializer do
|
7
7
|
if object.user
|
@@ -19,7 +19,7 @@ api_output = <<-eos
|
|
19
19
|
"success": true,
|
20
20
|
"alert": {
|
21
21
|
"heading": "OTP was verified succesfully",
|
22
|
-
"message": "You may need to accept the terms and conditions to get the API token if you have not yet
|
22
|
+
"message": "You may need to accept the terms and conditions to get the API token if you have not yet finished the registration"
|
23
23
|
},
|
24
24
|
"data": {
|
25
25
|
"api_token": "",
|
@@ -19,7 +19,7 @@ api_output = <<-eos
|
|
19
19
|
"success": true,
|
20
20
|
"alert": {
|
21
21
|
"heading": "OTP was verified succesfully",
|
22
|
-
"message": "You may need to accept the terms and conditions to get the API token if you have not yet
|
22
|
+
"message": "You may need to accept the terms and conditions to get the API token if you have not yet finished the registration"
|
23
23
|
},
|
24
24
|
"data": {
|
25
25
|
"api_token": "22431f28189e2c88ba58ee221f373931",
|
@@ -57,7 +57,7 @@ en:
|
|
57
57
|
message: "Check if you have properly given the OTP along with dialing prefix, mobile number & UUID"
|
58
58
|
verification_success:
|
59
59
|
heading: "OTP was verified succesfully"
|
60
|
-
message: "You may need to accept the terms and conditions to get the API token if you have not yet
|
60
|
+
message: "You may need to accept the terms and conditions to get the API token if you have not yet finished the registration"
|
61
61
|
accept_tac:
|
62
62
|
tac_accepted:
|
63
63
|
heading: "You have successfully accepted the Terms & Conditions. Proceed with Registration process if any"
|
@@ -57,7 +57,7 @@ en:
|
|
57
57
|
message: "Check if you have properly given the OTP along with dialing prefix, mobile number & UUID"
|
58
58
|
verification_success:
|
59
59
|
heading: "OTP was verified succesfully"
|
60
|
-
message: "You may need to accept the terms and conditions to get the API token if you have not yet
|
60
|
+
message: "You may need to accept the terms and conditions to get the API token if you have not yet finished the registration"
|
61
61
|
accept_tac:
|
62
62
|
tac_accepted:
|
63
63
|
heading: "You have successfully accepted the Terms & Conditions. Proceed with Registration process if any"
|
data/lib/usman/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -107,7 +107,7 @@ dependencies:
|
|
107
107
|
version: '0.1'
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.1.
|
110
|
+
version: 0.1.20
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
113
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -117,7 +117,7 @@ dependencies:
|
|
117
117
|
version: '0.1'
|
118
118
|
- - ">="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version: 0.1.
|
120
|
+
version: 0.1.20
|
121
121
|
- !ruby/object:Gem::Dependency
|
122
122
|
name: pattana
|
123
123
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,7 +127,7 @@ dependencies:
|
|
127
127
|
version: '0.1'
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.1.
|
130
|
+
version: 0.1.16
|
131
131
|
type: :runtime
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
version: '0.1'
|
138
138
|
- - ">="
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 0.1.
|
140
|
+
version: 0.1.16
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: bcrypt
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|