(handler func(echo.Context, storage.App) error)
| 410 | } |
| 411 | |
| 412 | func appResolver(handler func(echo.Context, storage.App) error) func(c echo.Context) error { |
| 413 | return func(c echo.Context) error { |
| 414 | id := c.Param("id") |
| 415 | app, ok := storage.Apps.Get(id) |
| 416 | if !ok { |
| 417 | return c.NoContent(404) |
| 418 | } |
| 419 | return handler(c, app) |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | func jobResolver(handler func(echo.Context, *storage.ReturnJob) error) func(c echo.Context) error { |
| 424 | return func(c echo.Context) error { |