code: func (h *DashboardHandler) handleGetDashboards(w http.ResponseWriter, r *http.Request) {
  	ctx := r.Context()
  	req, err := decodeGetDashboardsRequest(ctx, r)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  
  	if req.ownerID != nil {
  		filter := platform.UserResourceMappingFilter{
  			UserID:   *req.ownerID,
  			UserType: platform.Owner,
  			Resource: platform.DashboardsResource,
  		}
  
  		mappings, _, err := h.UserResourceMappingService.FindUserResourceMappings(ctx, filter)
  		if err != nil {
  			EncodeError(ctx, errors.InternalErrorf("Error loading dashboard owners: %v", err), w)
  			return
  		}
  
  		for _, mapping := range mappings {
  			req.filter.IDs = append(req.filter.IDs, &mapping.ResourceID)
  		}
  	}
  
  	dashboards, _, err := h.DashboardService.FindDashboards(ctx, req.filter, req.opts)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  
  	if err := encodeResponse(ctx, w, http.StatusOK, newGetDashboardsResponse(ctx, dashboards, h.LabelService)); err != nil {
  		logEncodingError(h.Logger, r, err)
  		return
  	}
  }
docs: // handleGetDashboards returns all dashboards within the store.