@luizleon/sf.prefeiturasp.vuecomponents 4.1.14 → 4.1.16
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/http-client/apiClient.d.ts +2 -1
- package/dist/sf.prefeiturasp.vuecomponents.cjs +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.cjs.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.js +11 -10
- package/dist/sf.prefeiturasp.vuecomponents.js.map +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs +1 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -8825,14 +8825,15 @@ class Fh {
|
|
|
8825
8825
|
je(this, "axios");
|
|
8826
8826
|
this.axios = ae.create(e == null ? void 0 : e.config);
|
|
8827
8827
|
const n = window.location.origin + "/api";
|
|
8828
|
-
this.axios.defaults.baseURL || (this.axios.defaults.baseURL = n), e != null && e.anonymous || this.axios.interceptors.request.use(async (r) =>
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8828
|
+
this.axios.defaults.baseURL || (this.axios.defaults.baseURL = n), e != null && e.anonymous || this.axios.interceptors.request.use(async (r) => await this.AccessTokenInterceptor(r));
|
|
8829
|
+
}
|
|
8830
|
+
async AccessTokenInterceptor(e) {
|
|
8831
|
+
if (!Ih(e.baseURL + e.url))
|
|
8832
|
+
return e;
|
|
8833
|
+
const n = ep().oidc;
|
|
8834
|
+
await n.updateToken(10);
|
|
8835
|
+
const r = n.token;
|
|
8836
|
+
return r ? e.headers.Authorization = `Bearer ${r}` : n.login(), e;
|
|
8836
8837
|
}
|
|
8837
8838
|
async GetAsync(e) {
|
|
8838
8839
|
return this.axios.get(e).then((n) => this.HandleThen(n)).catch((n) => this.HandleCatch(n));
|
|
@@ -8867,8 +8868,8 @@ class Fh {
|
|
|
8867
8868
|
}
|
|
8868
8869
|
ParsedResponse(e) {
|
|
8869
8870
|
try {
|
|
8870
|
-
const n = typeof e.hasSuccess == "boolean", r = typeof e.hasError == "boolean", o =
|
|
8871
|
-
return n && r && o
|
|
8871
|
+
const n = typeof e.hasSuccess == "boolean", r = typeof e.hasError == "boolean", o = Array.isArray(e.errors);
|
|
8872
|
+
return n && r && o ? e : null;
|
|
8872
8873
|
} catch {
|
|
8873
8874
|
return null;
|
|
8874
8875
|
}
|