Skip to content
Snippets Groups Projects
Commit 80e2b050 authored by Yoan VALLET's avatar Yoan VALLET
Browse files

fix page state on auth_old endpoint

parent 771c5e85
No related branches found
No related tags found
No related merge requests found
Pipeline #5394 passed
......@@ -101,12 +101,12 @@ func main() {
fmt.Printf("Page state: %s\n", pageState)
fmt.Printf("Page usage: %s\n", pageUsage)
splitIndex := strings.Index(pageUsage, "-")
splitIndex := strings.Index(pageState, "-")
if splitIndex == -1 {
fmt.Println("No host found")
}
state := string([]byte(pageUsage[0:splitIndex]))
host := string([]byte(pageUsage[splitIndex+1:len(pageUsage)]))
state := string([]byte(pageState[0:splitIndex]))
host := string([]byte(pageState[splitIndex+1:len(pageState)]))
redir := host + "?code=" + pageCode + "&state="+ state +"&usage_point_id=" + pageUsage
fmt.Println(time.Now().Format("2006-01-02 15:04:05"), "- Redirect to -", redir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment