From ffd1205f35672fa77a0853589a638349ff65c681 Mon Sep 17 00:00:00 2001 From: casulit Date: Fri, 18 Oct 2024 10:22:42 +0800 Subject: [PATCH] refactor(server): streamline address field and add image logging --- config/deno-kv.ts | 8 ++++++++ server.ts | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/deno-kv.ts b/config/deno-kv.ts index 628b4f0..335c626 100644 --- a/config/deno-kv.ts +++ b/config/deno-kv.ts @@ -189,6 +189,14 @@ export async function listenQueue(kv: Deno.Kv) { }); console.log("Listing updated"); + console.log( + "Images updated ", + JSON.stringify( + images.map((image) => image.src), + null, + 2 + ) + ); await transaction.commit(); diff --git a/server.ts b/server.ts index fd575e8..7b44164 100644 --- a/server.ts +++ b/server.ts @@ -16,7 +16,6 @@ app.get("/", async (c: Context) => { l.project_name, l.description, l.is_scraped, - l.address AS listing_address, l.price, l.price_formatted, p.id AS property_id, @@ -41,7 +40,7 @@ app.get("/", async (c: Context) => { p.ai_generated_basic_features, pt.type_name AS property_type_name, wt.type_name AS warehouse_type_name, - p.address AS property_address, + l.address AS listing_address, rg.region AS listing_region_name, ct.city AS listing_city_name, ar.area AS listing_area_name,