@onehat/data 1.8.3 → 1.8.6
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 +1 -1
- package/src/Entity.js +4 -2
- package/src/Property/PercentInt.js +1 -0
- package/src/Repository/OneBuild.js +30 -0
package/package.json
CHANGED
package/src/Entity.js
CHANGED
|
@@ -152,9 +152,11 @@ class Entity extends EventEmitter {
|
|
|
152
152
|
},
|
|
153
153
|
set (target, name, value, receiver) {
|
|
154
154
|
if (!Reflect.has(target, name)) {
|
|
155
|
-
|
|
155
|
+
target.setValue(name, value);
|
|
156
|
+
} else {
|
|
157
|
+
Reflect.set(target, name, value, receiver);
|
|
156
158
|
}
|
|
157
|
-
return
|
|
159
|
+
return true; // Return true, or else we sometimes get a proxy trap type error. https://developer.mozilla.org/en-US/docs/web/javascript/reference/global_objects/proxy/proxy/set
|
|
158
160
|
},
|
|
159
161
|
});
|
|
160
162
|
|
|
@@ -291,6 +291,36 @@ class OneBuildRepository extends AjaxRepository {
|
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
+
forgotPassword = (email = null, username = null) => {
|
|
295
|
+
const data = {
|
|
296
|
+
url: 'forgotPassword',
|
|
297
|
+
data: qs.stringify({
|
|
298
|
+
email,
|
|
299
|
+
username,
|
|
300
|
+
}),
|
|
301
|
+
method: 'POST',
|
|
302
|
+
baseURL: this.api.baseURL,
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
if (this.debugMode) {
|
|
306
|
+
console.log('forgotPassword', data);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return this.axios(data)
|
|
310
|
+
.then((result) => {
|
|
311
|
+
if (this.debugMode) {
|
|
312
|
+
console.log('forgotPassword result', result);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const response = result.data;
|
|
316
|
+
if (!response.success) {
|
|
317
|
+
throw new Error(response.data);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return response;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
|
|
294
324
|
}
|
|
295
325
|
|
|
296
326
|
|