PiStats icon indicating copy to clipboard operation
PiStats copied to clipboard

Unnecessary check if API key exists to display the disable button

Open johnflan opened this issue 2 years ago • 0 comments

The app has logic (below) to only display the enable button if an API key is set. I use PiHole without a password (and thus without an API key), in this mode you don't require sending an API key to the interface to disable PiHole.

var canDisplayEnableDisableButton: Bool { return !piholes.allSatisfy { return $0.apiToken.isEmpty == true } }

I have removed this check and tested it locally and it behaves properly.

johnflan avatar Aug 14 '22 17:08 johnflan