Skip to content

Commit ce547e9

Browse files
authored
Fix deezer's fetch user (#537)
1 parent 69f1373 commit ce547e9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

providers/deezer/deezer.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"io/ioutil"
1212
"net/http"
1313
"net/url"
14+
"strconv"
1415

1516
"github.com/markbates/goth"
1617
"golang.org/x/oauth2"
@@ -115,7 +116,7 @@ func (p *Provider) FetchUser(session goth.Session) (goth.User, error) {
115116
// *goth.User attributes
116117
func userFromReader(reader io.Reader, user *goth.User) error {
117118
u := struct {
118-
ID string `json:"id"`
119+
ID int `json:"id"`
119120
Email string `json:"email"`
120121
FirstName string `json:"firstname"`
121122
LastName string `json:"lastname"`
@@ -129,7 +130,7 @@ func userFromReader(reader io.Reader, user *goth.User) error {
129130
return err
130131
}
131132

132-
user.UserID = u.ID
133+
user.UserID = strconv.Itoa(u.ID)
133134
user.Email = u.Email
134135
user.FirstName = u.FirstName
135136
user.LastName = u.LastName

0 commit comments

Comments
 (0)