From ce547e95223830ebb6881e2a81a4b6517d0113d1 Mon Sep 17 00:00:00 2001 From: Anthony MARQUES Date: Thu, 15 Feb 2024 18:45:17 +0100 Subject: [PATCH] Fix deezer's fetch user (#537) --- providers/deezer/deezer.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/providers/deezer/deezer.go b/providers/deezer/deezer.go index e2e2e157c..0647237ce 100644 --- a/providers/deezer/deezer.go +++ b/providers/deezer/deezer.go @@ -11,6 +11,7 @@ import ( "io/ioutil" "net/http" "net/url" + "strconv" "github.com/markbates/goth" "golang.org/x/oauth2" @@ -115,7 +116,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) { // *goth.User attributes func userFromReader(reader io.Reader, user *goth.User) error { u := struct { - ID string `json:"id"` + ID int `json:"id"` Email string `json:"email"` FirstName string `json:"firstname"` LastName string `json:"lastname"` @@ -129,7 +130,7 @@ func userFromReader(reader io.Reader, user *goth.User) error { return err } - user.UserID = u.ID + user.UserID = strconv.Itoa(u.ID) user.Email = u.Email user.FirstName = u.FirstName user.LastName = u.LastName