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)
| 194 | // UpdateWebhook delegates to service.UpdateWebhook. Optional proto fields map |
| 195 | // 1:1 onto the model's nullable pointers. Requires super-admin auth. |
| 196 | func (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. |
| 212 | func (h *AdminHandler) DeleteWebhook(ctx context.Context, req *authorizerv1.DeleteWebhookRequest) (*authorizerv1.DeleteWebhookResponse, error) { |
nothing calls this directly
no test coverage detected