From 4707e73421d43bc9c3773d37104923aa4eb1bd0b Mon Sep 17 00:00:00 2001 From: patrickzerhusen Date: Fri, 17 Apr 2026 19:59:23 +0200 Subject: [PATCH] commented READ action handler --- api/contributions.php | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/api/contributions.php b/api/contributions.php index 3dcb4b4..55ac14b 100644 --- a/api/contributions.php +++ b/api/contributions.php @@ -1,23 +1,23 @@ $municipality_id]; + // Optional: Filters by Category if (!empty($input['category'])) { $sql .= " AND category = :cat"; $params[':cat'] = $input['category']; @@ -85,13 +86,13 @@ function handle_read($input) { error_response('Database Error: ' . $e->getMessage(), 500); } - // Build GeoJSON FeatureCollection + // Builds GeoJSON FeatureCollection $features = []; foreach ($rows as $row) { $geometry = json_decode($row['geojson']); - // Remove raw Geometry Columns from Properties + // Removes raw Geometry Columns from Properties unset($row['geom']); unset($row['geojson']);