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.
Files changed (2) hide show
  1. package/dist/beca-ui.js +15 -12
  2. 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" && (s.method === "POST" || s.method === "PUT" || s.method === "DELETE")) {
86179
- if (!sessionStorage.getItem("X-XSRF-TOKEN")) {
86180
- const g = await fetch("/api/antiforgery/token", {
86181
- method: "GET",
86182
- headers: h.headers
86183
- });
86184
- g.ok && sessionStorage.setItem("X-XSRF-TOKEN", await g.json());
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
- h.headers = {
86187
- ...h.headers,
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beca-ui",
3
- "version": "2.0.19-beta.82",
3
+ "version": "2.0.19-beta.84",
4
4
  "description": "Becawork UI",
5
5
  "license": "MIT",
6
6
  "author": {