@beam3_dev/api_module 0.0.61 → 0.0.62
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 +14 -6
- package/dist/wb3Api.js.map +1 -1
- package/dist/wb3Api.umd.cjs +2 -2
- package/dist/wb3Api.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/wb3Api.js
CHANGED
|
@@ -374,10 +374,18 @@ const J = async (e, t, n) => {
|
|
|
374
374
|
return;
|
|
375
375
|
const s = `${e.space}/resources/v1/application/CSRF`;
|
|
376
376
|
try {
|
|
377
|
-
const o = await f(
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
const o = await f(
|
|
378
|
+
s,
|
|
379
|
+
(r) => {
|
|
380
|
+
const i = JSON.parse(o);
|
|
381
|
+
console.log("getCSRFToken() / response => ", i), t?.(i.csrf);
|
|
382
|
+
},
|
|
383
|
+
(r) => {
|
|
384
|
+
n?.({ error, headers, xhr });
|
|
385
|
+
}
|
|
386
|
+
);
|
|
387
|
+
} catch (o) {
|
|
388
|
+
n?.("erreur", o);
|
|
381
389
|
}
|
|
382
390
|
};
|
|
383
391
|
async function G(e, t = void 0, n = void 0, s = void 0) {
|
|
@@ -682,11 +690,11 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0) {
|
|
|
682
690
|
}
|
|
683
691
|
async function I(e, t = void 0, n = void 0, s = void 0) {
|
|
684
692
|
const o = e.objID;
|
|
685
|
-
(!o || o === "") && console.warn(
|
|
693
|
+
delete e.token, (!o || o === "") && console.warn(
|
|
686
694
|
"_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
|
|
687
695
|
), (e.space === "" || !e.space) && console.warn(
|
|
688
696
|
"_3DSpace_download_doc() / Le paramètre space est obligatoire"
|
|
689
|
-
),
|
|
697
|
+
), (e.token === "" || !e.token) && (J(
|
|
690
698
|
e,
|
|
691
699
|
(r) => {
|
|
692
700
|
e.token = r;
|