MCPcopy Create free account
hub / github.com/authorizerdev/authorizer / UpdateWebhook

Method UpdateWebhook

internal/grpcsrv/handlers/admin.go:196–209  ·  view source on GitHub ↗

UpdateWebhook delegates to service.UpdateWebhook. Optional proto fields map 1:1 onto the model's nullable pointers. Requires super-admin auth.

(ctx context.Context, req *authorizerv1.UpdateWebhookRequest)

Source from the content-addressed store, hash-verified

194// UpdateWebhook delegates to service.UpdateWebhook. Optional proto fields map
195// 1:1 onto the model's nullable pointers. Requires super-admin auth.
196func (h *AdminHandler) UpdateWebhook(ctx context.Context, req *authorizerv1.UpdateWebhookRequest) (*authorizerv1.UpdateWebhookResponse, error) {
197 res, _, err := h.Service.UpdateWebhook(ctx, transport.MetaFromGRPC(ctx), &model.UpdateWebhookRequest{
198 ID: req.GetId(),
199 EventName: req.EventName,
200 EventDescription: req.EventDescription,
201 Endpoint: req.Endpoint,
202 Enabled: req.Enabled,
203 Headers: appDataToMap(req.GetHeaders()),
204 })
205 if err != nil {
206 return nil, err
207 }
208 return &authorizerv1.UpdateWebhookResponse{Message: res.Message}, nil
209}
210
211// DeleteWebhook delegates to service.DeleteWebhook. Requires super-admin auth.
212func (h *AdminHandler) DeleteWebhook(ctx context.Context, req *authorizerv1.DeleteWebhookRequest) (*authorizerv1.DeleteWebhookResponse, error) {

Callers

nothing calls this directly

Calls 5

MetaFromGRPCFunction · 0.92
appDataToMapFunction · 0.85
UpdateWebhookMethod · 0.65
GetIdMethod · 0.45
GetHeadersMethod · 0.45

Tested by

no test coverage detected