calculateRequestStats is a helper to compute request statistics.
(c *gin.Context)
| 366 | |
| 367 | // calculateRequestStats is a helper to compute request statistics. |
| 368 | func (s *Server) GetGroupStats(c *gin.Context) { |
| 369 | id, err := strconv.Atoi(c.Param("id")) |
| 370 | if err != nil { |
| 371 | response.ErrorI18nFromAPIError(c, app_errors.ErrBadRequest, "validation.invalid_group_id") |
| 372 | return |
| 373 | } |
| 374 | |
| 375 | stats, err := s.GroupService.GetGroupStats(c.Request.Context(), uint(id)) |
| 376 | if s.handleGroupError(c, err) { |
| 377 | return |
| 378 | } |
| 379 | |
| 380 | response.Success(c, stats) |
| 381 | } |
| 382 | |
| 383 | // GroupCopyRequest defines the payload for copying a group. |
| 384 | type GroupCopyRequest struct { |
nothing calls this directly
no test coverage detected