From 4b12599c6af5b630692c161ab334a75430e93240 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Mon, 15 Jul 2024 11:48:29 +0200 Subject: [PATCH] Revert "fix: GIS API should return geometry (#3195)" This reverts commit 8f6633440f0e00fb3d23725ce4d99bc4a5ee9949. --- api.planx.uk/modules/gis/service/digitalLand.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api.planx.uk/modules/gis/service/digitalLand.ts b/api.planx.uk/modules/gis/service/digitalLand.ts index 6f8d968cef..9298eefd31 100644 --- a/api.planx.uk/modules/gis/service/digitalLand.ts +++ b/api.planx.uk/modules/gis/service/digitalLand.ts @@ -5,7 +5,7 @@ import type { } from "@opensystemslab/planx-core/types"; import { gql } from "graphql-request"; import fetch from "isomorphic-fetch"; -import { addDesignatedVariable } from "./helpers"; +import { addDesignatedVariable, omitGeometry } from "./helpers"; import { baseSchema } from "./local_authorities/metadata/base"; import { $api } from "../../../client"; @@ -119,14 +119,14 @@ async function go( ); // because there can be many digital land datasets per planx variable, check if this key is already in our result if (key && Object.keys(formattedResult).includes(key)) { - formattedResult[key]["data"]?.push(entity); + formattedResult[key]["data"]?.push(omitGeometry(entity)); } else { if (key) { formattedResult[key] = { fn: key, value: true, text: baseSchema[key].pos, - data: [entity], + data: [omitGeometry(entity)], category: baseSchema[key].category, }; }