(c *stdapi.Context)
| 1471 | } |
| 1472 | |
| 1473 | func (s *Server) SystemUpdate(c *stdapi.Context) error { |
| 1474 | if err := s.hook("SystemUpdateValidate", c); err != nil { |
| 1475 | return err |
| 1476 | } |
| 1477 | |
| 1478 | var opts structs.SystemUpdateOptions |
| 1479 | if err := stdapi.UnmarshalOptions(c.Request(), &opts); err != nil { |
| 1480 | return err |
| 1481 | } |
| 1482 | |
| 1483 | err := s.provider(c).WithContext(c.Context()).SystemUpdate(opts) |
| 1484 | if err != nil { |
| 1485 | return err |
| 1486 | } |
| 1487 | |
| 1488 | return c.RenderOK() |
| 1489 | } |
| 1490 | |
| 1491 | func (s *Server) Workers(c *stdapi.Context) error { |
| 1492 | return stdapi.Errorf(404, "not available via api") |
nothing calls this directly
no test coverage detected