Minor fixes.
All checks were successful
thehideout/TheHideout-API/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-01-03 00:32:21 +00:00
parent b10247509a
commit ccfa654016
3 changed files with 16 additions and 5 deletions

View File

@ -0,0 +1,11 @@
{
"folders": [
{
"path": "../../../TheHideout-UI"
},
{
"path": "../.."
}
],
"settings": {}
}

View File

@ -63,7 +63,7 @@ export async function addToNotionDataSource(
} else if (key === "Features") {
notionProperties[key] = {
multi_select: value.map((feature) => ({
name: feature.replace(/,/g, ";"),
name: feature,
})),
};
} else if (key === "Message" && value != "") {
@ -188,7 +188,7 @@ export async function updateNotionPage(
} else if (key === "Features") {
notionProperties[key] = {
multi_select: value.map((feature) => ({
name: feature.replace(/,/g, ";"),
name: feature,
})),
};
} else if (typeof value === "string" && value != "") {

View File

@ -90,7 +90,7 @@ export async function storeProperties(env, properties) {
}
}
export async function transformSmoobuProperty(env, property) {
export function transformSmoobuProperty(env, property) {
console.log("Transforming property:", property.id);
let street = property.location?.street || "";
// Remove leading number and whitespace if present
@ -121,7 +121,7 @@ export async function transformSmoobuProperty(env, property) {
}`.trim()
: "Unknown Address",
features:
property.amenities.map((feature) => feature.replaceAll(",", ";")) || [],
property.amenities.map((feature) => feature.replace(/,/g, ";")) || [],
minPrice: property.price?.minimal ? parseFloat(property.price.minimal) : 0,
maxPrice: property.price?.maximal ? parseFloat(property.price.maximal) : 0,
};
@ -241,7 +241,7 @@ export async function transformNotionProperty(env, notionProperty) {
const syncName = properties["Sync Name"]?.checkbox || false;
const features = properties["Features"]?.["multi_select"].map((feature) =>
feature.name.replaceAll(",", ";")
feature.name.replace(/,/g, ";")
);
// Extract name from title
const name = properties.Name?.title?.[0]?.plain_text || "Untitled";