From 9518cf1cb359db966970fe3ee4720fd77b2102c1 Mon Sep 17 00:00:00 2001 From: Viet Nguyen <3805254+vnugent@users.noreply.github.com> Date: Sat, 20 Jan 2024 13:31:04 -0700 Subject: [PATCH] fix: add id back to geojson props (#386) * fix: add id back to geojson props --- src/db/utils/jobs/CragGeojson/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/db/utils/jobs/CragGeojson/index.ts b/src/db/utils/jobs/CragGeojson/index.ts index 24f5f9df..41b5387a 100644 --- a/src/db/utils/jobs/CragGeojson/index.ts +++ b/src/db/utils/jobs/CragGeojson/index.ts @@ -27,6 +27,7 @@ async function exportLeafCrags (): Promise { const ancestorArray = ancestors.split(',') const pointFeature = point(doc.metadata.lnglat.coordinates, { + id: metadata.area_id.toUUID().toString(), name: areaName, type: 'crag', content, @@ -122,6 +123,7 @@ async function exportCragGroups (): Promise { for await (const doc of rs) { const polygonFeature = feature(doc.polygon, { type: 'crag-group', + id: doc.uuid.toUUID().toString(), name: doc.name, children: doc.childAreaList.map(({ uuid, name, leftRightIndex }) => ( { id: uuid.toUUID().toString(), name, lr: leftRightIndex }))