Merge pull request #16 from eko/removed-break-auth

Removed app kill depending on auth status code (fixes #15)
This commit is contained in:
Vincent Composieux 2019-10-02 15:24:45 +02:00 committed by GitHub
commit c84484e5df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -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