(c *stdapi.Context)
| 67 | } |
| 68 | |
| 69 | func (s *Server) AppGet(c *stdapi.Context) error { |
| 70 | if err := s.hook("AppGetValidate", c); err != nil { |
| 71 | return err |
| 72 | } |
| 73 | |
| 74 | name := c.Var("name") |
| 75 | |
| 76 | v, err := s.provider(c).WithContext(c.Context()).AppGet(name) |
| 77 | if err != nil { |
| 78 | return err |
| 79 | } |
| 80 | |
| 81 | if vs, ok := interface{}(v).(Sortable); ok { |
| 82 | sort.Slice(v, vs.Less) |
| 83 | } |
| 84 | |
| 85 | return c.RenderJSON(v) |
| 86 | } |
| 87 | |
| 88 | func (s *Server) AppList(c *stdapi.Context) error { |
| 89 | if err := s.hook("AppListValidate", c); err != nil { |