fix fetch

This commit is contained in:
BlasenhauerJ 2022-11-18 16:02:07 +01:00
parent 4f9b2120e0
commit 2967ed98cd
1 changed files with 3 additions and 2 deletions

View File

@ -194,9 +194,9 @@ class FetchLogs {
//get settings
this.instanceName = this.instance.textContent;
if (!this.instanceName || this.instanceName.trim() === "none") return false;
this.formDate = this.fromDateInp.valueAsNumber
this.fromDate = this.fromDateInp.valueAsNumber
? this.fromDateInp.valueAsNumber
: Math.round(Date.now() / 1000 - 86400);
: Math.round(Date.now() / 1000) - 86400;
this.toDate = this.toDateInp.valueAsNumber
? this.toDateInp.valueAsNumber
: false;
@ -216,6 +216,7 @@ class FetchLogs {
}
async getLogsFromToDate() {
console.log(this.fromDate, this.toDate);
let response;
if (this.toDate) {
response = await fetch(