From 1005c2ee6eae4d14f139c4fe2a1c5095db6cb9a3 Mon Sep 17 00:00:00 2001 From: cesarLima1 Date: Mon, 9 Dec 2024 16:21:35 -0400 Subject: [PATCH] [TM-1425] add data attribute --- .../MonitoredData/GetPolygonsIndicatorAnalysisController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/V2/MonitoredData/GetPolygonsIndicatorAnalysisController.php b/app/Http/Controllers/V2/MonitoredData/GetPolygonsIndicatorAnalysisController.php index 13800a69..01e465c5 100644 --- a/app/Http/Controllers/V2/MonitoredData/GetPolygonsIndicatorAnalysisController.php +++ b/app/Http/Controllers/V2/MonitoredData/GetPolygonsIndicatorAnalysisController.php @@ -78,6 +78,7 @@ public function __invoke(EntityModel $entity, string $slug) 'year_of_analysis' => $indicator->year_of_analysis, 'created_at' => $indicator->created_at, 'base_line' => $indicator->created_at, + 'data' => [], ]; if (str_contains($slug, 'treeCoverLoss')) { $valueYears = json_decode($indicator->value, true); @@ -115,6 +116,6 @@ public function processValuesHectares($values) } } - return $separateKeys; + return ['data' => $separateKeys]; } }