Skip to content
Snippets Groups Projects
Unverified Commit 9d1b675c authored by Max Adamo's avatar Max Adamo
Browse files

minor

parent 90f0b79d
Branches
Tags
No related merge requests found
...@@ -76,8 +76,8 @@ func triggerPuppet(w http.ResponseWriter, req *http.Request) { ...@@ -76,8 +76,8 @@ func triggerPuppet(w http.ResponseWriter, req *http.Request) {
authToken = strings.Split(req.Header.Get("Authorization"), "Bearer ")[1] authToken = strings.Split(req.Header.Get("Authorization"), "Bearer ")[1]
} }
okMsg := fmt.Sprintln("{\n \"status\": \"OK\",\n \"response\": 200\n}") okMsg := fmt.Sprintln("{\n \"status\": \"OK\",\n \"response\": 200\n}")
unauthorizedMsg := fmt.Sprintln("{\n \"status\": \"OK\",\n \"response\": 401\n}") unauthorizedMsg := fmt.Sprintln("{\n \"status\": \"KO\",\n \"response\": 401\n}")
unavailableMsg := fmt.Sprintln("{\n \"status\": \"OK\",\n \"response\": 503\n}") unavailableMsg := fmt.Sprintln("{\n \"status\": \"KO\",\n \"response\": 503\n}")
w.Header().Set("Content-Type", "application/json") w.Header().Set("Content-Type", "application/json")
if authToken != bearerToken { if authToken != bearerToken {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment