func ListWebhooks(w http.ResponseWriter, req *http.Request) {
	h, err := hash.NewFromHash(mux.Vars(req)["addr"])
	if err != nil {
		httputils.ErrorOut(w, http.StatusNotFound, accountNotFound)
		return
	}

	repo := container.Instance.GetWebhookRepo()
	webhooks, err := repo.FetchByHash(*h)
	if err != nil {
		msg := fmt.Sprintf("error while retrieving webhooks: %s", err)
		httputils.ErrorOut(w, http.StatusInternalServerError, msg)
		return
	}

	// Output wh
	_ = httputils.JSONOut(w, http.StatusOK, webhooks)
}
// ListWebhooks returns a list of all webhooks for the given account
ListWebhooks returns a list of all webhooks for the given account
// ListWebhooks returns a list of all webhooks for the given account
func ListWebhooks(w http.ResponseWriter, req *http.Request) {
	h, err := hash.NewFromHash(mux.Vars(req)["addr"])
	if err != nil {
		httputils.ErrorOut(w, http.StatusNotFound, accountNotFound)
		return
	}
	repo := container.Instance.GetWebhookRepo()
	webhooks, err := repo.FetchByHash(*h)
	if err != nil {
		msg := fmt.Sprintf("error while retrieving webhooks: %s", err)
		httputils.ErrorOut(w, http.StatusInternalServerError, msg)
		return
	}
	_ = httputils.JSONOut(w, http.StatusOK, webhooks)
}
func ListWebhooks ( w http . ResponseWriter , req * http . Request ) { h , err := hash . NewFromHash ( mux . Vars ( req ) [ " " ] ) if err != nil { httputils . ErrorOut ( w , http . StatusNotFound , accountNotFound ) return } repo := container . Instance . GetWebhookRepo ( ) webhooks , err := repo . FetchByHash ( * h ) if err != nil { msg := fmt . Sprintf ( " " , err ) httputils . ErrorOut ( w , http . StatusInternalServerError , msg ) return } _ = httputils . JSONOut ( w , http . StatusOK , webhooks ) }
ListWebhooks returns a list of all webhooks for the given account
ListWebhooks returns a list of all webhooks for the given account
// Output wh