mirror of
https://github.com/go-gitea/gitea
synced 2025-08-15 14:08:28 +00:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user