Skip to content

Commit

Permalink
run prettier in api
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Oct 12, 2023
1 parent 118d4ed commit e6dbce0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions api.planx.uk/gis/digitalLand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,16 @@ async function go(

// FLOODING
if (formattedResult["flood"] && formattedResult["flood"].value) {
["flood.zone.1", "flood.zone.2", "flood.zone.3"].forEach((zone) =>
formattedResult[zone] = {
fn: zone,
value: Boolean(formattedResult["flood"].data?.filter((entity) => entity["flood-risk-level"] === zone.split(".").pop()).length),
},
["flood.zone.1", "flood.zone.2", "flood.zone.3"].forEach(
(zone) =>
(formattedResult[zone] = {
fn: zone,
value: Boolean(
formattedResult["flood"].data?.filter(
(entity) => entity["flood-risk-level"] === zone.split(".").pop(),
).length,
),
}),
);
}

Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/gis/local_authorities/metadata/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const baseSchema: PlanningConstraintsBaseSchema = {
"digital-land-datasets": ["ancient-woodland"],
category: "Ecology",
},
"flood": {
flood: {
active: true,
neg: "is not in a Flood Risk Zone",
pos: "is in a Flood Risk Zone",
Expand Down

0 comments on commit e6dbce0

Please sign in to comment.