DeleteGroup handles deleting a group.
(c *gin.Context)
| 315 | |
| 316 | // DeleteGroup handles deleting a group. |
| 317 | func (s *Server) DeleteGroup(c *gin.Context) { |
| 318 | id, err := strconv.Atoi(c.Param("id")) |
| 319 | if err != nil { |
| 320 | response.ErrorI18nFromAPIError(c, app_errors.ErrBadRequest, "validation.invalid_group_id") |
| 321 | return |
| 322 | } |
| 323 | |
| 324 | if s.handleGroupError(c, s.GroupService.DeleteGroup(c.Request.Context(), uint(id))) { |
| 325 | return |
| 326 | } |
| 327 | response.SuccessI18n(c, "success.group_deleted", nil) |
| 328 | } |
| 329 | |
| 330 | // ConfigOption represents a single configurable option for a group. |
| 331 | type ConfigOption struct { |
nothing calls this directly
no test coverage detected