From 83e6451c89bd0de7ffc60735b848e5b3ce57ca67 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Tue, 3 Mar 2020 13:27:13 +0100 Subject: [PATCH] Update state value in main.go --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index f1b499f..de781c1 100644 --- a/main.go +++ b/main.go @@ -18,8 +18,8 @@ func main() { mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { query := r.URL.Query() host := strings.Split(query.Get("state"), "-")[0] - state := strings.Split(query.Get("state"), "-")[1] - usagePointId := query.Get("usage_point_id") + state := query.Get("state") + usagePointId := query.Get("usage_point_id") code := query.Get("code") redir := "http://" + host + "?code=" + code + "?state="+ state +"&usage_point_id=" + usagePointId http.Redirect(w, r, redir, 302) -- GitLab