beca-ui 2.0.19-beta.83 → 2.0.19-beta.85

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