(c *stdapi.Context)
| 241 | } |
| 242 | |
| 243 | func (s *Server) BuildImport(c *stdapi.Context) error { |
| 244 | if err := s.hook("BuildImportValidate", c); err != nil { |
| 245 | return err |
| 246 | } |
| 247 | |
| 248 | app := c.Var("app") |
| 249 | r := c |
| 250 | |
| 251 | v, err := s.provider(c).WithContext(c.Context()).BuildImport(app, r) |
| 252 | if err != nil { |
| 253 | return err |
| 254 | } |
| 255 | |
| 256 | if vs, ok := interface{}(v).(Sortable); ok { |
| 257 | sort.Slice(v, vs.Less) |
| 258 | } |
| 259 | |
| 260 | return c.RenderJSON(v) |
| 261 | } |
| 262 | |
| 263 | func (s *Server) BuildList(c *stdapi.Context) error { |
| 264 | if err := s.hook("BuildListValidate", c); err != nil { |
nothing calls this directly
no test coverage detected