feat(api)!: rename User.username to User.name in json

This commit is contained in:
Sam 2022-11-21 01:24:23 +01:00
parent 53a48ab4a4
commit 2be1c9550b
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ type Server struct {
type userResponse struct {
ID xid.ID `json:"id"`
Username string `json:"username"`
Username string `json:"name"`
DisplayName *string `json:"display_name"`
Bio *string `json:"bio"`
AvatarURLs []string `json:"avatar_urls"`

View File

@ -50,7 +50,7 @@ func dbMemberToMember(u db.User, m db.Member, names []db.Name, pronouns []db.Pro
type PartialUser struct {
ID xid.ID `json:"id"`
Username string `json:"username"`
Username string `json:"name"`
DisplayName *string `json:"display_name"`
AvatarURLs []string `json:"avatar_urls"`
}

View File

@ -13,7 +13,7 @@ import (
type GetUserResponse struct {
ID xid.ID `json:"id"`
Username string `json:"username"`
Username string `json:"name"`
DisplayName *string `json:"display_name"`
Bio *string `json:"bio"`
AvatarURLs []string `json:"avatar_urls"`