From 611a0e3deceb1e4b9903421df4f1603823dddf6c Mon Sep 17 00:00:00 2001 From: Pancakes Date: Sat, 27 Jul 2024 20:53:30 -0400 Subject: [PATCH] Fix game url stuff in google.go --- api/account/google.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/api/account/google.go b/api/account/google.go index b99d61e..9efaadc 100644 --- a/api/account/google.go +++ b/api/account/google.go @@ -22,7 +22,6 @@ import ( "errors" "net/http" "net/url" - "os" "github.com/golang-jwt/jwt/v5" ) @@ -35,15 +34,14 @@ var ( func HandleGoogleCallback(w http.ResponseWriter, r *http.Request) (string, error) { code := r.URL.Query().Get("code") - gameUrl := os.Getenv("GAME_URL") if code == "" { - defer http.Redirect(w, r, gameUrl, http.StatusSeeOther) + defer http.Redirect(w, r, GameURL, http.StatusSeeOther) return "", errors.New("code is empty") } googleId, err := RetrieveGoogleId(code) if err != nil { - defer http.Redirect(w, r, gameUrl, http.StatusSeeOther) + defer http.Redirect(w, r, GameURL, http.StatusSeeOther) return "", err }