feat: add avatar urls to groups (#4525)

This commit is contained in:
Jon Ayers
2022-10-17 17:46:01 -05:00
committed by GitHub
parent 9b4ab82044
commit e0a14f68fa
20 changed files with 228 additions and 46 deletions

View File

@ -11,7 +11,8 @@ import (
)
type CreateGroupRequest struct {
Name string `json:"name"`
Name string `json:"name"`
AvatarURL string `json:"avatar_url"`
}
type Group struct {
@ -19,6 +20,7 @@ type Group struct {
Name string `json:"name"`
OrganizationID uuid.UUID `json:"organization_id"`
Members []User `json:"members"`
AvatarURL string `json:"avatar_url"`
}
func (c *Client) CreateGroup(ctx context.Context, orgID uuid.UUID, req CreateGroupRequest) (Group, error) {
@ -77,6 +79,7 @@ type PatchGroupRequest struct {
AddUsers []string `json:"add_users"`
RemoveUsers []string `json:"remove_users"`
Name string `json:"name"`
AvatarURL *string `json:"avatar_url"`
}
func (c *Client) PatchGroup(ctx context.Context, group uuid.UUID, req PatchGroupRequest) (Group, error) {