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

Method GetGroupStats

internal/handler/group_handler.go:368–381  ·  view source on GitHub ↗

calculateRequestStats is a helper to compute request statistics.

(c *gin.Context)

Source from the content-addressed store, hash-verified

366
367// calculateRequestStats is a helper to compute request statistics.
368func (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.
384type GroupCopyRequest struct {

Callers

nothing calls this directly

Calls 3

handleGroupErrorMethod · 0.95
ErrorI18nFromAPIErrorFunction · 0.92
SuccessFunction · 0.92

Tested by

no test coverage detected