types: add RemoteUserAvatarURL to User

This commit is contained in:
Simone Gotti 2019-05-09 16:49:02 +02:00
parent b37eddbe8b
commit d0309db97f
2 changed files with 9 additions and 4 deletions

View File

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

View File

@ -206,8 +206,9 @@ type LinkedAccount struct {
ID string `json:"id,omitempty"`
RemoteUserID string `json:"remote_user_id,omitempty"`
RemoteUserName string `json:"remote_username,omitempty"`
RemoteUserID string `json:"remote_user_id,omitempty"`
RemoteUserName string `json:"remote_username,omitempty"`
RemoteUserAvatarURL string `json:"remote_user_avatar_url,omitempty"`
RemoteSourceID string `json:"remote_source_id,omitempty"`