Commit 4c3b8c9e authored by Weiser's avatar Weiser
Browse files

air wuality fix

parent dc32f29d
...@@ -299,11 +299,7 @@ const Currentdata = (props) => { ...@@ -299,11 +299,7 @@ const Currentdata = (props) => {
<div class="h3"> <div class="h3">
<h3>Air Quality</h3> <h3>Air Quality</h3>
</div> </div>
<input <input type="checkbox" id="air_quality_co"className="checkBoxFilter"/>
type="checkbox"
id="air_quality_co"
className="checkBoxFilter"
/>
<label for="air_quality_co">Air Quality CO</label> <label for="air_quality_co">Air Quality CO</label>
<br /> <br />
<input <input
...@@ -588,18 +584,7 @@ const Currentdata = (props) => { ...@@ -588,18 +584,7 @@ const Currentdata = (props) => {
filterArray.push("gust_mph"); filterArray.push("gust_mph");
} }
} }
if ( console.log(air_quality_co);
air_quality_co ||
air_quality_no2 ||
air_quality_o3 ||
air_quality_so2 ||
air_quality_pm2_5 ||
air_quality_pm10 ||
air_quality_us_epa_index ||
air_quality_gb_defra_index
) {
filterArray.push("air_quality");
}
if (air_quality_co) { if (air_quality_co) {
filterArray.push("co"); filterArray.push("co");
} }
...@@ -628,7 +613,7 @@ const Currentdata = (props) => { ...@@ -628,7 +613,7 @@ const Currentdata = (props) => {
let filterString = filterArray.join(","); let filterString = filterArray.join(",");
const apiUrl = `http://localhost:8080/currentweather?q=${latitude_text},${longitude_text}&filter=${filterString}`; const apiUrl = `http://localhost:8080/currentweather?q=${latitude_text},${longitude_text}&filter=${filterString}`;
console.log(apiUrl);
fetch(apiUrl) fetch(apiUrl)
.then((response) => { .then((response) => {
if (!response.ok) { if (!response.ok) {
......
...@@ -107,7 +107,7 @@ public class Current { ...@@ -107,7 +107,7 @@ public class Current {
private BigDecimal gustKph = null; private BigDecimal gustKph = null;
@JsonProperty("air_quality") @JsonProperty("air_quality")
private WeatherAirQuality airQuality = null; private WeatherAirQuality airQuality = new WeatherAirQuality();
public Current lastUpdatedEpoch(Integer lastUpdatedEpoch) { public Current lastUpdatedEpoch(Integer lastUpdatedEpoch) {
this.lastUpdatedEpoch = lastUpdatedEpoch; this.lastUpdatedEpoch = lastUpdatedEpoch;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment