Browse Source

[client] Bugfix: Updat to use new DB structure

pull/26/head
Starbeamrainbowlabs 4 years ago
parent
commit
fc3723a924
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 4
      client_src/js/DeviceReadingDisplay.mjs

4
client_src/js/DeviceReadingDisplay.mjs

@ -88,7 +88,7 @@ class DeviceReadingDisplay { @@ -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 { @@ -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…
Cancel
Save