From 01c8c9b921c9a3eab2ccdc47edc7e8e31cf7b5f6 Mon Sep 17 00:00:00 2001 From: Stavros Panakakis <53979866+Stavrospanakakis@users.noreply.github.com> Date: Wed, 16 Jun 2021 03:57:50 +0300 Subject: [PATCH] Update deprecated method (#474) --- handlers/login.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/handlers/login.go b/handlers/login.go index 59f254f..72cba5a 100644 --- a/handlers/login.go +++ b/handlers/login.go @@ -15,6 +15,7 @@ import ( "github.com/play-with-docker/play-with-docker/config" "github.com/play-with-docker/play-with-docker/pwd/types" uuid "github.com/satori/go.uuid" + "google.golang.org/api/option" "google.golang.org/api/people/v1" ) @@ -153,7 +154,7 @@ func LoginCallback(rw http.ResponseWriter, req *http.Request) { ) tc := oauth2.NewClient(ctx, ts) - p, err := people.New(tc) + p, err := people.NewService(ctx, option.WithHTTPClient(tc)) if err != nil { log.Printf("Could not initialize people service . Got: %v\n", err) rw.WriteHeader(http.StatusInternalServerError)