MCPcopy Create free account
hub / github.com/SignTools/SignTools / appResolver

Function appResolver

main.go:412–421  ·  view source on GitHub ↗
(handler func(echo.Context, storage.App) error)

Source from the content-addressed store, hash-verified

410}
411
412func 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
423func jobResolver(handler func(echo.Context, *storage.ReturnJob) error) func(c echo.Context) error {
424 return func(c echo.Context) error {

Callers 1

serveFunction · 0.70

Calls 1

GetMethod · 0.45

Tested by

no test coverage detected