Fixed bug due to a database change
diff --git a/cron/generateData.php b/cron/generateData.php
index 2489afa..1c3ae42 100644
--- a/cron/generateData.php
+++ b/cron/generateData.php
@@ -44,13 +44,14 @@
}
function query($soql) {
- $raw = file_get_contents("https://analisi.transparenciacatalunya.cat/resource/xuwf-dxjd.json?\$query=".urlencode($soql));
+ $url = "https://analisi.transparenciacatalunya.cat/resource/xuwf-dxjd.json?\$query=".urlencode($soql);
+ $raw = file_get_contents($url);
return json_decode($raw, true);
}
$data = query("SELECT data, regiosanitariadescripcio AS regio, sum(numcasos) AS sum_numcasos
WHERE
- resultatcoviddescripcio = 'Positiu' AND
+ resultatcoviddescripcio = 'Positiu PCR' AND
regiosanitariadescripcio <> 'No classificat'
GROUP BY regiosanitariadescripcio, data
ORDER BY data ASC, regiosanitariadescripcio");