Skip to content

Commit

Permalink
Fix UptimeKuma url breaking (bastienwirtz#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
dukeofsussex committed Feb 15, 2023
1 parent dfde8ea commit 0e2abd7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/services/UptimeKuma.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,15 @@ export default {
},
},
created() {
/* eslint-disable */
this.item.url = `${this.item.url}/status/${this.dashboard}`;
// eslint-disable-next-line vue/no-mutating-props
this.item.url = this.item.url.endsWith(this.dashboard)
? this.item.url
: `${this.item.url}/status/${this.dashboard}`;
this.fetchStatus();
},
methods: {
fetchStatus: function () {
const now = Date.now()
const now = Date.now();
this.fetch(`/api/status-page/${this.dashboard}?cachebust=${now}`)
.catch((e) => console.error(e))
.then((resp) => (this.incident = resp));
Expand Down

0 comments on commit 0e2abd7

Please sign in to comment.