0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-04 14:36:16 +02:00

add AvatarURL field to api groups (in modules/structs package)

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-08-16 16:20:46 -04:00
parent bc494f09ba
commit ba0c7caabb
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C
3 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ type Group struct {
NumSubgroups int64 `json:"num_subgroups"`
Link string `json:"link"`
SortOrder int `json:"sort_order"`
AvatarURL string `json:"avatar_url"`
}
// NewGroupOption represents options for creating a new group in an organization

View File

@ -26,6 +26,7 @@ func ToAPIGroup(ctx context.Context, g *group_model.Group, actor *user_model.Use
ParentGroupID: g.ParentGroupID,
Link: g.GroupLink(),
SortOrder: g.SortOrder,
AvatarURL: g.AvatarLink(ctx),
}
if apiGroup.NumSubgroups, err = group_model.CountGroups(ctx, &group_model.FindGroupsOptions{
ParentGroupID: g.ID,

View File

@ -26436,6 +26436,10 @@
"description": "Group represents a group of repositories and subgroups in an organization",
"type": "object",
"properties": {
"avatar_url": {
"type": "string",
"x-go-name": "AvatarURL"
},
"description": {
"type": "string",
"x-go-name": "Description"