code: func (c *SpaceTemplateController) List(ctx *app.ListSpaceTemplateContext) error {
  	res := &app.SpaceTemplateList{}
  	err := application.Transactional(c.db, func(appl application.Application) error {
  		templates, err := appl.SpaceTemplates().List(ctx)
  		if err != nil {
  			log.Error(ctx, map[string]interface{}{
  				"err": err,
  			}, "failed to list space templates")
  			return err
  		}
  		return ctx.ConditionalEntities(templates, c.config.GetCacheControlSpaceTemplates, func() error {
  			res.Data = ConvertSpaceTemplates(appl, ctx.Request, templates)
  			return nil
  		})
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	return ctx.OK(res)
  }
docs: // List runs the list action.