[client] Bugfix: Updat to use new DB structure

This commit is contained in:
Starbeamrainbowlabs 2019-02-20 18:41:40 +00:00
parent 2f218e1c88
commit fc3723a924
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 2 additions and 2 deletions

View File

@ -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