forked from forgejo/forgejo
Add name field for org api (#21270)
related #21205 The field `UserName` is not really usefull for an organization. This adds a second `Name` field. The [GitHub API](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) uses `name` too. `UserName` should be deprecated then.
This commit is contained in:
parent
1dfa28ffa5
commit
b7309b8ccb
6 changed files with 17 additions and 5 deletions
|
@ -296,6 +296,7 @@ func ToOrganization(org *organization.Organization) *api.Organization {
|
|||
return &api.Organization{
|
||||
ID: org.ID,
|
||||
AvatarURL: org.AsUser().AvatarLink(),
|
||||
Name: org.Name,
|
||||
UserName: org.Name,
|
||||
FullName: org.FullName,
|
||||
Description: org.Description,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue