flowrix 1.0.1-beta.152 → 1.0.1-beta.153
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
|
@@ -4,8 +4,6 @@ export const useQuickView = (slug) => {
|
|
|
4
4
|
const { data, error, refresh, execute, pending } = useFetch(
|
|
5
5
|
`/api/quickview/${slug}`,
|
|
6
6
|
{
|
|
7
|
-
method: "POST",
|
|
8
|
-
body: { slug },
|
|
9
7
|
lazy: true,
|
|
10
8
|
server: false,
|
|
11
9
|
default: () => null
|
|
@@ -20,8 +18,9 @@ export const useQuickView = (slug) => {
|
|
|
20
18
|
};
|
|
21
19
|
};
|
|
22
20
|
export const useSendQuickValues = async (attributes, slug) => {
|
|
21
|
+
let query = {};
|
|
22
|
+
query["body"] = attributes;
|
|
23
23
|
return await $fetch(`/api/quickview/${slug}`, {
|
|
24
|
-
|
|
25
|
-
body: attributes
|
|
24
|
+
query
|
|
26
25
|
});
|
|
27
26
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { defineEventHandler, getRouterParam,
|
|
1
|
+
import { defineEventHandler, getRouterParam, getQuery } from "h3";
|
|
2
2
|
import { flowrixApi } from "../../../middleware/flowrix.js";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
export default defineEventHandler(async (event) => {
|
|
5
5
|
const slug = getRouterParam(event, "slug");
|
|
6
|
-
|
|
6
|
+
let query = getQuery(event);
|
|
7
|
+
let body = query.body;
|
|
8
|
+
console.log(body, JSON.stringify(body));
|
|
7
9
|
const config = useRuntimeConfig();
|
|
8
10
|
const rawCookies = event.req.headers.cookie || "";
|
|
9
11
|
const apiConfig = {
|
|
@@ -14,7 +16,7 @@ export default defineEventHandler(async (event) => {
|
|
|
14
16
|
headers: {
|
|
15
17
|
"x-api-secret": apiConfig?.FLOWRIX_API_SECRET || ""
|
|
16
18
|
},
|
|
17
|
-
body
|
|
19
|
+
body
|
|
18
20
|
};
|
|
19
21
|
const quickview = await flowrixApi.post(`quickview/${slug}`, apiConfig, options);
|
|
20
22
|
return quickview;
|