MCPcopy Create free account
hub / github.com/tbphp/gpt-load / ListGroups

Method ListGroups

internal/handler/group_handler.go:103–115  ·  view source on GitHub ↗

ListGroups handles listing all groups.

(c *gin.Context)

Source from the content-addressed store, hash-verified

101
102// ListGroups handles listing all groups.
103func (s *Server) ListGroups(c *gin.Context) {
104 groups, err := s.GroupService.ListGroups(c.Request.Context())
105 if s.handleGroupError(c, err) {
106 return
107 }
108
109 groupResponses := make([]GroupResponse, 0, len(groups))
110 for i := range groups {
111 groupResponses = append(groupResponses, *s.newGroupResponse(&groups[i]))
112 }
113
114 response.Success(c, groupResponses)
115}
116
117// GroupUpdateRequest defines the payload for updating a group.
118// Using a dedicated struct avoids issues with zero values being ignored by GORM's Update.

Callers 1

GetIntegrationInfoMethod · 0.45

Calls 3

handleGroupErrorMethod · 0.95
newGroupResponseMethod · 0.95
SuccessFunction · 0.92

Tested by

no test coverage detected