Skip to content

Commit

Permalink
Update piHole.ts
Browse files Browse the repository at this point in the history
attempt to change pihole api key setting to enable working widgets
  • Loading branch information
FoxyJ86 authored Mar 5, 2025
1 parent 1d3a4af commit 21a2a74
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/server/sdk/pihole/piHole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class PiHoleClient {

async getSummary() {
const response = await fetch(
new URL(`${this.baseHostName}/admin/api.php?summaryRaw&auth=${this.apiToken}`)
new URL(`${this.baseHostName}/api.php?summaryRaw&auth=${this.apiToken}`)
);

if (response.status !== 200) {
Expand Down Expand Up @@ -48,8 +48,8 @@ export class PiHoleClient {
): Promise<PiHoleApiStatusChangeResponse> {
const response = await fetch(
duration !== 0
? `${this.baseHostName}/admin/api.php?${action}=${duration}&auth=${this.apiToken}`
: `${this.baseHostName}/admin/api.php?${action}&auth=${this.apiToken}`
? `${this.baseHostName}/api.php?${action}=${duration}&auth=${this.apiToken}`
: `${this.baseHostName}/api.php?${action}&auth=${this.apiToken}`
);

if (response.status !== 200) {
Expand Down

0 comments on commit 21a2a74

Please sign in to comment.