diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue index 8c9a82d..34a01ab 100644 --- a/src/components/services/PiHole.vue +++ b/src/components/services/PiHole.vue @@ -170,13 +170,15 @@ export default { const authenticated = await this.authenticate(); if (!authenticated) return; } - const summary_response = await this.fetch( - `api/stats/summary?sid=${encodeURIComponent(this.sessionId)}`, - ); - const status_response = await this.fetch( - `api/dns/blocking?sid=${encodeURIComponent(this.sessionId)}`, - ); + const [summary_response, status_response] = await Promise.all([ + this.fetch( + `api/stats/summary?sid=${encodeURIComponent(this.sessionId)}` + ), + this.fetch( + `api/dns/blocking?sid=${encodeURIComponent(this.sessionId)}` + ) + ]); if ( summary_response?.queries?.percent_blocked === undefined ||