Skip to content

Commit 394b9cc

Browse files
add AvatarURL field to api groups (in modules/structs package)
1 parent 3a39d35 commit 394b9cc

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

modules/structs/repo_group.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ type Group struct {
1414
NumSubgroups int64 `json:"num_subgroups"`
1515
Link string `json:"link"`
1616
SortOrder int `json:"sort_order"`
17+
AvatarURL string `json:"avatar_url"`
1718
}
1819

1920
// NewGroupOption represents options for creating a new group in an organization

services/convert/repo_group.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func ToAPIGroup(ctx context.Context, g *group_model.Group, actor *user_model.Use
2626
ParentGroupID: g.ParentGroupID,
2727
Link: g.GroupLink(),
2828
SortOrder: g.SortOrder,
29+
AvatarURL: g.AvatarLink(ctx),
2930
}
3031
if apiGroup.NumSubgroups, err = group_model.CountGroups(ctx, &group_model.FindGroupsOptions{
3132
ParentGroupID: g.ID,

templates/swagger/v1_json.tmpl

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)