Skip to content

Commit

Permalink
Fix deezer's fetch user (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonymq authored Feb 15, 2024
1 parent 69f1373 commit ce547e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions providers/deezer/deezer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
"strconv"

"github.com/markbates/goth"
"golang.org/x/oauth2"
Expand Down Expand Up @@ -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"`
Expand All @@ -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
Expand Down

0 comments on commit ce547e9

Please sign in to comment.