code: func (c *SpaceAreasController) List(ctx *app.ListSpaceAreasContext) error {
  	var areas []area.Area
  	err := application.Transactional(c.db, func(appl application.Application) error {
  		err := appl.Spaces().CheckExists(ctx, ctx.SpaceID)
  		if err != nil {
  			return err
  		}
  		areas, err = appl.Areas().List(ctx, ctx.SpaceID)
  		return err
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	for _, a := range areas {
  		log.Info(ctx, map[string]interface{}{"area_id": a.ID}, "Found space area with id %s", a.ID)
  	}
  	return ctx.ConditionalEntities(areas, c.config.GetCacheControlAreas, func() error {
  		res := &app.AreaList{}
  		res.Data = ConvertAreas(c.db, ctx.Request, areas, addResolvedPath)
  		return ctx.OK(res)
  	})
  }
docs: // List runs the list action.