Skip to content
Permalink
Browse files

Removed app kill depending on auth status code (fixes #15)

  • Loading branch information...
eko committed Oct 2, 2019
1 parent d72e73c commit f556b22890ae13c18081d164c1719d094f98320f
Showing with 0 additions and 6 deletions.
  1. +0 −6 internal/pihole/client.go
@@ -7,7 +7,6 @@ import (
"log"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"time"
@@ -119,11 +118,6 @@ func (c *Client) getPHPSessionID() (sessionID string) {
log.Printf("An error has occured during login to PI-Hole: %v", err)
}

if resp.StatusCode != http.StatusOK {
log.Printf("Unable to login to PI-Hole, got a HTTP status code response '%d' instead of '%d'", resp.StatusCode, http.StatusFound)
os.Exit(1)
}

for _, cookie := range resp.Cookies() {
if cookie.Name == "PHPSESSID" {
sessionID = cookie.Value

0 comments on commit f556b22

Please sign in to comment.
You can’t perform that action at this time.