MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / handleListWebhooks

Method handleListWebhooks

internal/httpapi/webhooks.go:514–528  ·  view source on GitHub ↗
(ctx context.Context, _ *struct{})

Source from the content-addressed store, hash-verified

512}
513
514func (s *Server) handleListWebhooks(ctx context.Context, _ *struct{}) (*listWebhooksOutput, error) {
515 user, err := s.requireAccountUser(ctx)
516 if err != nil {
517 return nil, err
518 }
519 hooks, err := s.deps.ListWebhooks(ctx, user.ID)
520 if err != nil {
521 return nil, NewError(http.StatusInternalServerError, "internal_error", "failed to list webhooks")
522 }
523 items := make([]WebhookView, 0, len(hooks))
524 for i := range hooks {
525 items = append(items, webhookView(&hooks[i]))
526 }
527 return &listWebhooksOutput{Body: NewPage(items, "")}, nil
528}
529
530func (s *Server) handleGetWebhook(ctx context.Context, in *WebhookIDParam) (*webhookOutput, error) {
531 user, err := s.requireAccountUser(ctx)

Callers

nothing calls this directly

Calls 5

requireAccountUserMethod · 0.95
NewErrorFunction · 0.85
makeFunction · 0.85
webhookViewFunction · 0.85
NewPageFunction · 0.85

Tested by

no test coverage detected