| 458 | } |
| 459 | |
| 460 | func (s *Server) EventSend(c *stdapi.Context) error { |
| 461 | if err := s.hook("EventSendValidate", c); err != nil { |
| 462 | return err |
| 463 | } |
| 464 | |
| 465 | action := c.Value("action") |
| 466 | |
| 467 | var opts structs.EventSendOptions |
| 468 | if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil { |
| 469 | return err |
| 470 | } |
| 471 | |
| 472 | err := s.provider(c).WithContext(c.Context()).EventSend(action, opts) |
| 473 | if err != nil { |
| 474 | return err |
| 475 | } |
| 476 | |
| 477 | return c.RenderOK() |
| 478 | } |
| 479 | |
| 480 | func (s *Server) FilesDelete(c *stdapi.Context) error { |
| 481 | if err := s.hook("FilesDeleteValidate", c); err != nil { |