mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 14:12:37 +02:00
add AvatarURL field to api groups (in modules/structs package)
This commit is contained in:
1 parent
bc494f09ba
commit
ba0c7caabb
3 files changed
+6
No files matched your search
@@ -14,6 +14,7 @@ type Group struct {
|
|||||||
NumSubgroups int64 `json:"num_subgroups"`
|
NumSubgroups int64 `json:"num_subgroups"`
|
||||||
Link string `json:"link"`
|
Link string `json:"link"`
|
||||||
SortOrder int `json:"sort_order"`
|
SortOrder int `json:"sort_order"`
|
||||||
|
AvatarURL string `json:"avatar_url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewGroupOption represents options for creating a new group in an organization
|
// 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,
|
ParentGroupID: g.ParentGroupID,
|
||||||
Link: g.GroupLink(),
|
Link: g.GroupLink(),
|
||||||
SortOrder: g.SortOrder,
|
SortOrder: g.SortOrder,
|
||||||
|
AvatarURL: g.AvatarLink(ctx),
|
||||||
}
|
}
|
||||||
if apiGroup.NumSubgroups, err = group_model.CountGroups(ctx, &group_model.FindGroupsOptions{
|
if apiGroup.NumSubgroups, err = group_model.CountGroups(ctx, &group_model.FindGroupsOptions{
|
||||||
ParentGroupID: g.ID,
|
ParentGroupID: g.ID,
|
||||||
|
|||||||
Generated
+4
@@ -26436,6 +26436,10 @@
|
|||||||
"description": "Group represents a group of repositories and subgroups in an organization",
|
"description": "Group represents a group of repositories and subgroups in an organization",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
"avatar_url": {
|
||||||
|
"type": "string",
|
||||||
|
"x-go-name": "AvatarURL"
|
||||||
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"x-go-name": "Description"
|
"x-go-name": "Description"
|
||||||
|
|||||||
Reference in new issue
Block a user