beca-ui 2.0.19-beta.82 → 2.0.19-beta.84
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/beca-ui.js +15 -12
- package/package.json +1 -1
package/dist/beca-ui.js
CHANGED
|
@@ -86175,19 +86175,22 @@ class NetworkService {
|
|
|
86175
86175
|
Accept: "application/json",
|
|
86176
86176
|
"Content-Type": "application/json; charset=UTF-8",
|
|
86177
86177
|
...h.headers
|
|
86178
|
-
}, axios.defaults.headers.common.WorkflowType !== "Public"
|
|
86179
|
-
if (
|
|
86180
|
-
|
|
86181
|
-
|
|
86182
|
-
|
|
86183
|
-
|
|
86184
|
-
|
|
86178
|
+
}, axios.defaults.headers.common.WorkflowType !== "Public") {
|
|
86179
|
+
if (s.method === "POST" || s.method === "PUT" || s.method === "DELETE") {
|
|
86180
|
+
if (!sessionStorage.getItem("X-XSRF-TOKEN")) {
|
|
86181
|
+
const g = await fetch("/api/antiforgery/token", {
|
|
86182
|
+
method: "GET",
|
|
86183
|
+
headers: h.headers
|
|
86184
|
+
});
|
|
86185
|
+
g.ok && sessionStorage.setItem("X-XSRF-TOKEN", await g.json());
|
|
86186
|
+
}
|
|
86187
|
+
h.headers = {
|
|
86188
|
+
...h.headers,
|
|
86189
|
+
"X-XSRF-TOKEN": sessionStorage.getItem("X-XSRF-TOKEN")
|
|
86190
|
+
};
|
|
86185
86191
|
}
|
|
86186
|
-
|
|
86187
|
-
|
|
86188
|
-
"X-XSRF-TOKEN": sessionStorage.getItem("X-XSRF-TOKEN")
|
|
86189
|
-
};
|
|
86190
|
-
}
|
|
86192
|
+
} else
|
|
86193
|
+
s.url = s.url.replace("/v2/", "/"), s.url = s.url.replace("/v1/", "/");
|
|
86191
86194
|
const m = s.url.split("/api/");
|
|
86192
86195
|
s.url = d + m[1];
|
|
86193
86196
|
try {
|