From 0e2abd76838e2ea9c4b02bd50f3ef95e8594cc38 Mon Sep 17 00:00:00 2001 From: Christopher Satchell Date: Wed, 15 Feb 2023 16:28:11 +0100 Subject: [PATCH] Fix UptimeKuma url breaking (#526) --- src/components/services/UptimeKuma.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/services/UptimeKuma.vue b/src/components/services/UptimeKuma.vue index 55232af3f..6b9c28a86 100644 --- a/src/components/services/UptimeKuma.vue +++ b/src/components/services/UptimeKuma.vue @@ -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));