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

Method GetSubGroups

internal/handler/group_handler.go:442–455  ·  view source on GitHub ↗

GetSubGroups handles getting sub groups of an aggregate group

(c *gin.Context)

Source from the content-addressed store, hash-verified

440
441// GetSubGroups handles getting sub groups of an aggregate group
442func (s *Server) GetSubGroups(c *gin.Context) {
443 id, err := strconv.Atoi(c.Param("id"))
444 if err != nil {
445 response.ErrorI18nFromAPIError(c, app_errors.ErrBadRequest, "validation.invalid_group_id")
446 return
447 }
448
449 subGroups, err := s.AggregateGroupService.GetSubGroups(c.Request.Context(), uint(id))
450 if s.handleGroupError(c, err) {
451 return
452 }
453
454 response.Success(c, subGroups)
455}
456
457// AddSubGroups handles adding sub groups to an aggregate group
458func (s *Server) AddSubGroups(c *gin.Context) {

Callers

nothing calls this directly

Calls 3

handleGroupErrorMethod · 0.95
ErrorI18nFromAPIErrorFunction · 0.92
SuccessFunction · 0.92

Tested by

no test coverage detected