flowrix 1.0.1-beta.154 → 1.0.1-beta.155
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
|
@@ -37,6 +37,7 @@ async function request(method, config = {}, endpoint, options = {}) {
|
|
|
37
37
|
...options,
|
|
38
38
|
headers,
|
|
39
39
|
onResponse({ response: response2 }) {
|
|
40
|
+
console.log(response2);
|
|
40
41
|
const token = response2.headers.get("x-session-token");
|
|
41
42
|
if (token) {
|
|
42
43
|
if (process.client) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineEventHandler } from "h3";
|
|
1
|
+
import { defineEventHandler, getQuery } from "h3";
|
|
2
2
|
import { flowrixApi } from "../../../middleware/flowrix.js";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
import { existsSync } from "fs";
|
|
5
5
|
import { join } from "path";
|
|
6
6
|
import { rm } from "fs/promises";
|
|
7
7
|
export default defineEventHandler(async (event) => {
|
|
8
|
+
let query = getQuery(event);
|
|
8
9
|
const slug = event.context.params._;
|
|
9
10
|
const config = useRuntimeConfig();
|
|
10
11
|
const rawCookies = event.req.headers.cookie || "";
|
|
@@ -15,7 +16,8 @@ export default defineEventHandler(async (event) => {
|
|
|
15
16
|
const options = {
|
|
16
17
|
headers: {
|
|
17
18
|
"x-api-secret": apiConfig?.FLOWRIX_API_SECRET || ""
|
|
18
|
-
}
|
|
19
|
+
},
|
|
20
|
+
query
|
|
19
21
|
};
|
|
20
22
|
const page = await flowrixApi.get(`permalink/${slug}`, apiConfig, options);
|
|
21
23
|
if (config.FLOWRIX_CACHE != "true" || config.public?.FLOWRIX_CACHE != "true") {
|