func (c *SpaceAreasController) List(ctx *app.ListSpaceAreasContext) error {
	spaceID, 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 {
		_, err = appl.Spaces().Load(ctx, spaceID)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound(err.Error()))
		}
		areas, err := appl.Areas().List(ctx, spaceID)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		for _, a := range areas {
			logrus.Info("Found space area with ID=", a.ID.String())
		}
		return ctx.ConditionalEntities(areas, c.config.GetCacheControlAreas, func() error {
			res := &app.AreaList{}
			res.Data = ConvertAreas(appl, ctx.RequestData, areas, addResolvedPath)
			return ctx.OK(res)
		})
	})
}
// List runs the list action.
List runs the list action.
// List runs the list action .
func (c *SpaceAreasController) List(ctx *app.ListSpaceAreasContext) error {
	spaceID, 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 {
		_, err = appl.Spaces().Load(ctx, spaceID)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound(err.Error()))
		}
		areas, err := appl.Areas().List(ctx, spaceID)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		for _, a := range areas {
			logrus.Info("Found space area with ID=", a.ID.String())
		}
		return ctx.ConditionalEntities(areas, c.config.GetCacheControlAreas, func() error {
			res := &app.AreaList{}
			res.Data = ConvertAreas(appl, ctx.RequestData, areas, addResolvedPath)
			return ctx.OK(res)
		})
	})
}
func ( c * SpaceAreasController ) List ( ctx * app . ListSpaceAreasContext ) error { spaceID , 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 { _ , err = appl . Spaces ( ) . Load ( ctx , spaceID ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , goa . ErrNotFound ( err . Error ( ) ) ) } areas , err := appl . Areas ( ) . List ( ctx , spaceID ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , err ) } for _ , a := range areas { logrus . Info ( " " , a . ID . String ( ) ) } return ctx . ConditionalEntities ( areas , c . config . GetCacheControlAreas , func ( ) error { res := & app . AreaList { } res . Data = ConvertAreas ( appl , ctx . RequestData , areas , addResolvedPath ) return ctx . OK ( res ) } ) } ) }
List runs the list action.
List runs the list action .