una-nuxt-module 3.0.31 → 3.0.33
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -167,7 +167,7 @@ function addTemplates() {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
const name = "una-nuxt-module";
|
|
170
|
-
const version = "3.0.
|
|
170
|
+
const version = "3.0.33";
|
|
171
171
|
|
|
172
172
|
const module$1 = defineNuxtModule({
|
|
173
173
|
meta: {
|
|
@@ -377,11 +377,11 @@ const module$1 = defineNuxtModule({
|
|
|
377
377
|
)
|
|
378
378
|
);
|
|
379
379
|
addPlugin({
|
|
380
|
-
name: "
|
|
380
|
+
name: "api-fetch",
|
|
381
381
|
src: resolve("./runtime/repository-pattern/plugins/api-fetch"),
|
|
382
382
|
mode: "client"
|
|
383
383
|
});
|
|
384
|
-
logger.ready(green("
|
|
384
|
+
logger.ready(green("Patr\xF3n repositorio integrado"));
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
try {
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { type useAsyncData } from '#imports';
|
|
2
|
+
export declare const useLazyAPI: typeof useAsyncData;
|
|
@@ -14,6 +14,13 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
options.headers.set("Authorization", `Bearer ${authStore.token}`);
|
|
17
|
+
},
|
|
18
|
+
async onResponseError({ response }) {
|
|
19
|
+
if (response?.status === 401) {
|
|
20
|
+
const { $pinia } = useNuxtApp();
|
|
21
|
+
const authStore = useAuthStore($pinia);
|
|
22
|
+
await authStore.logout();
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
25
|
});
|
|
19
26
|
return {
|