@beam3_dev/api_module 0.0.270 → 0.0.272
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/dist/wb3Api.js +13 -12
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +7 -7
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -2314,23 +2314,24 @@ function ht(e, t = void 0, s = void 0) {
|
|
|
2314
2314
|
function yt(e, t = void 0, s = void 0) {
|
|
2315
2315
|
return new Promise((n, i) => {
|
|
2316
2316
|
try {
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
m(c, {
|
|
2317
|
+
let r;
|
|
2318
|
+
if (e._3DDashboard) {
|
|
2319
|
+
const o = e._3DDashboard + "/api/users/current";
|
|
2320
|
+
console.log("_3DSwym_get_currentUser | url", o), m(o, {
|
|
2322
2321
|
method: "GET",
|
|
2323
|
-
onComplete(
|
|
2324
|
-
|
|
2325
|
-
const
|
|
2326
|
-
|
|
2322
|
+
onComplete(a, c, d) {
|
|
2323
|
+
let u = {};
|
|
2324
|
+
const p = String(a).replace(/'/g, '"');
|
|
2325
|
+
Object.keys(p).forEach((f) => {
|
|
2326
|
+
p[f] === "firstName" && (u.first_name = p.firstName);
|
|
2327
|
+
}), u.first_name = u.firstName, u.last_name = u.lastName, console.log("_3DSwym_get_currentUser | info", u), r = u, n(u);
|
|
2327
2328
|
},
|
|
2328
|
-
onFailure(
|
|
2329
|
-
i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current",
|
|
2329
|
+
onFailure(a) {
|
|
2330
|
+
i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
|
|
2330
2331
|
}
|
|
2331
2332
|
});
|
|
2332
2333
|
}
|
|
2333
|
-
|
|
2334
|
+
r ? n(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
|
|
2334
2335
|
} catch (r) {
|
|
2335
2336
|
i("ERROR | _3DSwym_get_currentUser => ", r);
|
|
2336
2337
|
}
|