This commit is contained in:
BlasenhauerJ 2022-11-18 15:35:32 +01:00
parent f1e614fae6
commit 4f9b2120e0
1 changed files with 12 additions and 5 deletions

View File

@ -216,11 +216,18 @@ class FetchLogs {
}
async getLogsFromToDate() {
const response = await fetch(
`${location.href}/${this.instanceName}?from_date=${this.fromDate}${
this.toDate ? `?to_date=${this.toDate}` : ``
}`
);
let response;
if (this.toDate) {
response = await fetch(
`${location.href}/${this.instanceName}?from_date=${this.fromDate}?to_date=${this.toDate}`
);
}
if (!this.toDate) {
response = await fetch(
`${location.href}/${this.instanceName}?from_date=${this.fromDate}`
);
}
if (response.status === 200) {
const res = await response.json();