MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / DeleteHook

Method DeleteHook

api/hooks.go:69–77  ·  view source on GitHub ↗

DeleteHook removes a webhook by ID.

(c *gin.Context)

Source from the content-addressed store, hash-verified

67
68// DeleteHook removes a webhook by ID.
69func (a *Api) DeleteHook(c *gin.Context) {
70 hookID := c.Param("id")
71 if err := a.ledgerforge.Hooks.DeleteHook(c.Request.Context(), hookID); err != nil {
72 c.JSON(http.StatusBadRequest, apierror.NewAPIError(apierror.ErrInvalidInput, "failed to delete hook", err))
73 return
74 }
75
76 c.JSON(http.StatusOK, gin.H{"message": "hook deleted successfully"})
77}

Callers

nothing calls this directly

Calls 2

NewAPIErrorFunction · 0.92
DeleteHookMethod · 0.65

Tested by

no test coverage detected