diff --git a/main.go b/main.go index f1b499f7efe3f35fa000d6963d7190424384ae51..de781c1254484237af6bdb3b8338703df4a8e2eb 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)