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

Method GetHook

api/hooks.go:45–54  ·  view source on GitHub ↗

GetHook retrieves a specific webhook by ID.

(c *gin.Context)

Source from the content-addressed store, hash-verified

43
44// GetHook retrieves a specific webhook by ID.
45func (a *Api) GetHook(c *gin.Context) {
46 hookID := c.Param("id")
47 hook, err := a.ledgerforge.Hooks.GetHook(c.Request.Context(), hookID)
48 if err != nil {
49 c.JSON(http.StatusNotFound, apierror.NewAPIError(apierror.ErrNotFound, "hook not found", err))
50 return
51 }
52
53 c.JSON(http.StatusOK, hook)
54}
55
56// ListHooks retrieves all hooks of a specific type.
57func (a *Api) ListHooks(c *gin.Context) {

Callers

nothing calls this directly

Calls 2

NewAPIErrorFunction · 0.92
GetHookMethod · 0.65

Tested by

no test coverage detected