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:
parent
bc494f09ba
commit
ba0c7caabb
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
4
templates/swagger/v1_json.tmpl
generated
4
templates/swagger/v1_json.tmpl
generated
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user