mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-22 10:25:01 +00:00
[client] Bugfix: Updat to use new DB structure
This commit is contained in:
parent
2f218e1c88
commit
fc3723a924
1 changed files with 2 additions and 2 deletions
|
@ -88,7 +88,7 @@ class DeviceReadingDisplay {
|
|||
this.reading_type = this.reading_types.find((type) => type.id == default_reading_type);
|
||||
// Default to the 1st reading type if we can't find the default
|
||||
if(typeof this.reading_type == "undefined")
|
||||
this.reading_type = this.reading_types[0].id;
|
||||
this.reading_type = this.reading_types[0];
|
||||
|
||||
// Create the reading type buttons
|
||||
let reading_type_list = this.display.querySelector(".reading-types");
|
||||
|
@ -186,7 +186,7 @@ class DeviceReadingDisplay {
|
|||
new_data = JSON.parse(await GetFromUrl(`${this.config.api_root}?` + Postify({
|
||||
action: "device-data",
|
||||
"device-id": this.device_id,
|
||||
"reading-type": this.reading_type.id,
|
||||
"reading-type": this.reading_type.short_descr,
|
||||
start: this.start_time.toISOString(),
|
||||
end: this.end_time.toISOString(),
|
||||
"average-seconds": average_seconds
|
||||
|
|
Loading…
Reference in a new issue