backend-manager 2.5.86 → 2.5.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -99,8 +99,9 @@ Module.prototype.signUp = function (payload) {
|
|
|
99
99
|
result.referrerUid = payload.affiliate.referrer;
|
|
100
100
|
})
|
|
101
101
|
.catch((e) => {
|
|
102
|
-
payload.affiliate.referrer =
|
|
103
|
-
|
|
102
|
+
payload.affiliate.referrer = null;
|
|
103
|
+
|
|
104
|
+
assistant.error('Failed to update affiliate code', e)
|
|
104
105
|
})
|
|
105
106
|
|
|
106
107
|
// Merge the payload and the default user object
|
|
@@ -144,14 +145,15 @@ Module.prototype.signUp = function (payload) {
|
|
|
144
145
|
|
|
145
146
|
Module.prototype.updateReferral = function (payload) {
|
|
146
147
|
const self = this;
|
|
147
|
-
const result = {
|
|
148
|
-
count: 0,
|
|
149
|
-
updatedReferral: false,
|
|
150
|
-
referrerUid: undefined,
|
|
151
|
-
}
|
|
152
|
-
payload = payload || {};
|
|
153
148
|
|
|
154
149
|
return new Promise(function(resolve, reject) {
|
|
150
|
+
const result = {
|
|
151
|
+
count: 0,
|
|
152
|
+
updatedReferral: false,
|
|
153
|
+
referrerUid: undefined,
|
|
154
|
+
}
|
|
155
|
+
payload = payload || {};
|
|
156
|
+
|
|
155
157
|
self.libraries.admin.firestore().collection('users')
|
|
156
158
|
.where('affiliate.code', '==', payload.affiliateCode)
|
|
157
159
|
.get()
|
|
@@ -183,7 +185,8 @@ Module.prototype.updateReferral = function (payload) {
|
|
|
183
185
|
}
|
|
184
186
|
}, {merge: true})
|
|
185
187
|
.catch(e => {
|
|
186
|
-
|
|
188
|
+
self.assistant.error('Error updating referral', e);
|
|
189
|
+
|
|
187
190
|
error = e;
|
|
188
191
|
})
|
|
189
192
|
|