From 940a247ab89d3b0092e4bc5ecaf11f654620316e Mon Sep 17 00:00:00 2001 From: viktormarinho Date: Wed, 28 Aug 2024 12:24:42 -0300 Subject: [PATCH 1/5] Release [0.56.13] --- deno.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deno.json b/deno.json index e0f1e293a..026e963aa 100644 --- a/deno.json +++ b/deno.json @@ -60,5 +60,5 @@ "jsx": "react-jsx", "jsxImportSource": "preact" }, - "version": "0.56.12" + "version": "0.56.13" } From 160fd078cf9797d24b63e703f64b6c657bb80256 Mon Sep 17 00:00:00 2001 From: guitavano Date: Thu, 19 Sep 2024 13:04:52 -0300 Subject: [PATCH 2/5] tavano linx logs --- linx/loaders/auction/detailsPage.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linx/loaders/auction/detailsPage.ts b/linx/loaders/auction/detailsPage.ts index e1b089315..efe89e177 100644 --- a/linx/loaders/auction/detailsPage.ts +++ b/linx/loaders/auction/detailsPage.ts @@ -16,6 +16,7 @@ const loader = async ( const { api, cdn } = ctx; const upstream = new URL(req.url); const splat = upstream.pathname.slice(1); + console.log(req.headers) const response = await api["GET /*splat"]({ splat, @@ -23,6 +24,8 @@ const loader = async ( headers: req.headers, }).catch(nullOnNotFound); + console.log(response) + if (response === null) { return null; } From a2942d8943699e27a4e1f3fe1793b6799d44bf94 Mon Sep 17 00:00:00 2001 From: guitavano Date: Thu, 19 Sep 2024 13:46:32 -0300 Subject: [PATCH 3/5] remove cf headers --- linx/loaders/auction/detailsPage.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linx/loaders/auction/detailsPage.ts b/linx/loaders/auction/detailsPage.ts index efe89e177..8830684ec 100644 --- a/linx/loaders/auction/detailsPage.ts +++ b/linx/loaders/auction/detailsPage.ts @@ -1,5 +1,6 @@ import type { AppContext } from "../../../linx/mod.ts"; import { nullOnNotFound } from "../../../utils/http.ts"; +import { removeCFHeaders } from "../../../website/handlers/proxy.ts"; import { isAuctionDetailModel } from "../../utils/paths.ts"; import { toAuctionDetail } from "../../utils/transform.ts"; import { Model as AuctionDetail } from "../../utils/types/auctionDetailJSON.ts"; @@ -16,12 +17,16 @@ const loader = async ( const { api, cdn } = ctx; const upstream = new URL(req.url); const splat = upstream.pathname.slice(1); - console.log(req.headers) + + const headers = req.headers; + removeCFHeaders(headers) const response = await api["GET /*splat"]({ splat, }, { - headers: req.headers, + headers: { + ...headers, + }, }).catch(nullOnNotFound); console.log(response) From 9affb4919d67280544f9d8486aa778f843a2ed53 Mon Sep 17 00:00:00 2001 From: guitavano Date: Thu, 19 Sep 2024 13:51:04 -0300 Subject: [PATCH 4/5] new headers --- linx/loaders/auction/detailsPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linx/loaders/auction/detailsPage.ts b/linx/loaders/auction/detailsPage.ts index 8830684ec..91b11c4da 100644 --- a/linx/loaders/auction/detailsPage.ts +++ b/linx/loaders/auction/detailsPage.ts @@ -18,7 +18,7 @@ const loader = async ( const upstream = new URL(req.url); const splat = upstream.pathname.slice(1); - const headers = req.headers; + const headers = new Headers(req.headers); removeCFHeaders(headers) const response = await api["GET /*splat"]({ From e5cc4cd9d7e71a2c4a2f81a9fa7a62ec5c897a6c Mon Sep 17 00:00:00 2001 From: italofg <99489312+italofg@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:19:49 -0300 Subject: [PATCH 5/5] Update transform.ts Added additionalProperty displayPrice in transform.ts --- linx/utils/transform.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linx/utils/transform.ts b/linx/utils/transform.ts index eed185abc..2b9bf6d02 100644 --- a/linx/utils/transform.ts +++ b/linx/utils/transform.ts @@ -206,12 +206,20 @@ export const toProduct = ( additionalType: "categoryItem", })); + const displayPrice = { + "@type": "PropertyValue", + name: product.DisplayPrice, + value: product.DisplayPrice, + additionalType: "displayPrice", + }; + const additionalProperty = [ ...skuOptions, ...metadatas, ...descriptions, ...prodOptions, ...categoryItems, + displayPrice, ]; const hasVariant = level < 1