GetSubGroups handles getting sub groups of an aggregate group
(c *gin.Context)
| 440 | |
| 441 | // GetSubGroups handles getting sub groups of an aggregate group |
| 442 | func (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 |
| 458 | func (s *Server) AddSubGroups(c *gin.Context) { |
nothing calls this directly
no test coverage detected