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