code: func (c *QueryController) Delete(ctx *app.DeleteQueryContext) error {
  	currentUser, err := login.ContextIdentity(ctx)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
  	}
  	err = application.Transactional(c.db, func(appl application.Application) error {
  		q, err := appl.Queries().Load(ctx.Context, ctx.QueryID, ctx.SpaceID)
  		if err != nil {
  			return errs.WithStack(err)
  		}
  		if q.Creator != *currentUser {
  			log.Warn(ctx, map[string]interface{}{
  				"query_id":     ctx.QueryID,
  				"creator":      q.Creator,
  				"current_user": *currentUser,
  			}, "user is not the query creator")
  			return errors.NewForbiddenError("user is not the query creator")
  		}
  		err = appl.Queries().Delete(ctx.Context, ctx.QueryID)
  		return errs.WithStack(err)
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	return ctx.NoContent()
  }
docs: // Delete runs the delete action.