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

Method DeleteSubGroup

internal/handler/group_handler.go:506–524  ·  view source on GitHub ↗

DeleteSubGroup handles deleting a sub group from an aggregate group

(c *gin.Context)

Source from the content-addressed store, hash-verified

504
505// DeleteSubGroup handles deleting a sub group from an aggregate group
506func (s *Server) DeleteSubGroup(c *gin.Context) {
507 id, err := strconv.Atoi(c.Param("id"))
508 if err != nil {
509 response.ErrorI18nFromAPIError(c, app_errors.ErrBadRequest, "validation.invalid_group_id")
510 return
511 }
512
513 subGroupID, err := strconv.Atoi(c.Param("subGroupId"))
514 if err != nil {
515 response.ErrorI18nFromAPIError(c, app_errors.ErrBadRequest, "validation.invalid_sub_group_id")
516 return
517 }
518
519 if err := s.AggregateGroupService.DeleteSubGroup(c.Request.Context(), uint(id), uint(subGroupID)); s.handleGroupError(c, err) {
520 return
521 }
522
523 response.SuccessI18n(c, "success.sub_group_deleted", nil)
524}
525
526// GetParentAggregateGroups handles getting parent aggregate groups that reference a group
527func (s *Server) GetParentAggregateGroups(c *gin.Context) {

Callers

nothing calls this directly

Calls 3

handleGroupErrorMethod · 0.95
ErrorI18nFromAPIErrorFunction · 0.92
SuccessI18nFunction · 0.92

Tested by

no test coverage detected