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

Method DeleteGroup

internal/handler/group_handler.go:317–328  ·  view source on GitHub ↗

DeleteGroup handles deleting a group.

(c *gin.Context)

Source from the content-addressed store, hash-verified

315
316// DeleteGroup handles deleting a group.
317func (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.
331type ConfigOption struct {

Callers

nothing calls this directly

Calls 3

handleGroupErrorMethod · 0.95
ErrorI18nFromAPIErrorFunction · 0.92
SuccessI18nFunction · 0.92

Tested by

no test coverage detected