func (c *AreaController) Show(ctx *app.ShowAreaContext) error {
	id, err := uuid.FromString(ctx.ID)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound(err.Error()))
	}

	return application.Transactional(c.db, func(appl application.Application) error {
		a, err := appl.Areas().Load(ctx, id)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		return ctx.ConditionalEntity(*a, c.config.GetCacheControlAreas, func() error {
			res := &app.AreaSingle{}
			res.Data = ConvertArea(appl, ctx.RequestData, *a, addResolvedPath)
			return ctx.OK(res)
		})
	})
}
// Show runs the show action.
Show runs the show action.
// Show runs the show action .
func (c *AreaController) Show(ctx *app.ShowAreaContext) error {
	id, err := uuid.FromString(ctx.ID)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound(err.Error()))
	}
	return application.Transactional(c.db, func(appl application.Application) error {
		a, err := appl.Areas().Load(ctx, id)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		return ctx.ConditionalEntity(*a, c.config.GetCacheControlAreas, func() error {
			res := &app.AreaSingle{}
			res.Data = ConvertArea(appl, ctx.RequestData, *a, addResolvedPath)
			return ctx.OK(res)
		})
	})
}
func ( c * AreaController ) Show ( ctx * app . ShowAreaContext ) error { id , err := uuid . FromString ( ctx . ID ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , goa . ErrNotFound ( err . Error ( ) ) ) } return application . Transactional ( c . db , func ( appl application . Application ) error { a , err := appl . Areas ( ) . Load ( ctx , id ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , err ) } return ctx . ConditionalEntity ( * a , c . config . GetCacheControlAreas , func ( ) error { res := & app . AreaSingle { } res . Data = ConvertArea ( appl , ctx . RequestData , * a , addResolvedPath ) return ctx . OK ( res ) } ) } ) }
Show runs the show action.
Show runs the show action .