gateway api: return linked account id

This commit is contained in:
Simone Gotti 2019-05-13 23:12:48 +02:00
parent a4744ab7f4
commit c41de71694
1 changed files with 2 additions and 0 deletions

View File

@ -160,6 +160,7 @@ type UserResponse struct {
} }
type LinkedAccountResponse struct { type LinkedAccountResponse struct {
ID string `json:"id"`
RemoteSourceID string `json:"remote_source_id"` RemoteSourceID string `json:"remote_source_id"`
RemoteUserName string `json:"remote_user_name"` RemoteUserName string `json:"remote_user_name"`
RemoteUserAvatarURL string `json:"remote_user_avatar_url"` RemoteUserAvatarURL string `json:"remote_user_avatar_url"`
@ -179,6 +180,7 @@ func createUserResponse(u *types.User) *UserResponse {
for _, la := range u.LinkedAccounts { for _, la := range u.LinkedAccounts {
user.LinkedAccounts = append(user.LinkedAccounts, &LinkedAccountResponse{ user.LinkedAccounts = append(user.LinkedAccounts, &LinkedAccountResponse{
ID: la.ID,
RemoteSourceID: la.RemoteSourceID, RemoteSourceID: la.RemoteSourceID,
RemoteUserName: la.RemoteUserName, RemoteUserName: la.RemoteUserName,
RemoteUserAvatarURL: la.RemoteUserAvatarURL, RemoteUserAvatarURL: la.RemoteUserAvatarURL,