@mouseless/baked 1.8.3 → 1.8.4
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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useRuntimeConfig } from "#app";
|
|
2
2
|
import { useComposableResolver, useDataFetcher, usePathBuilder, useUnref } from "#imports";
|
|
3
|
+
import { bfetch } from "../utils/bfetch.js";
|
|
3
4
|
|
|
4
5
|
export default function() {
|
|
5
6
|
const actions = {
|
|
@@ -87,7 +88,7 @@ function Remote({ actionExecuter }) {
|
|
|
87
88
|
? null
|
|
88
89
|
: (action.body ? unref.deepUnref(await dataFetcher.fetch({ data: action.body, contextData })) : { });
|
|
89
90
|
|
|
90
|
-
const response = await
|
|
91
|
+
const response = await bfetch(pathBuilder.build(action.path, params), {
|
|
91
92
|
baseURL: apiBaseURL,
|
|
92
93
|
method: action.method,
|
|
93
94
|
headers: headers,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useRuntimeConfig } from "#app";
|
|
2
2
|
import { createError, useMutex } from "#imports";
|
|
3
|
+
import { bfetch } from "../utils/bfetch.js";
|
|
3
4
|
|
|
4
5
|
export default function() {
|
|
5
6
|
const mutex = useMutex();
|
|
@@ -31,7 +32,7 @@ export default function() {
|
|
|
31
32
|
const token = await current(false);
|
|
32
33
|
if(!token?.accessIsExpired()) { return; }
|
|
33
34
|
|
|
34
|
-
const result = await
|
|
35
|
+
const result = await bfetch(auth.refreshApiRoute,
|
|
35
36
|
{
|
|
36
37
|
baseURL: apiBaseURL,
|
|
37
38
|
method: "POST",
|