Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary check if API key exists to display the disable button #38

Open
johnflan opened this issue Aug 14, 2022 · 0 comments
Open

Unnecessary check if API key exists to display the disable button #38

johnflan opened this issue Aug 14, 2022 · 0 comments

Comments

@johnflan
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant