code: func newGetMembersHandler(s platform.UserResourceMappingService, userService platform.UserService, resourceType platform.Resource, userType platform.UserType) http.HandlerFunc {
  	return func(w http.ResponseWriter, r *http.Request) {
  		ctx := r.Context()
  
  		req, err := decodeGetMembersRequest(ctx, r)
  		if err != nil {
  			EncodeError(ctx, err, w)
  			return
  		}
  
  		filter := platform.UserResourceMappingFilter{
  			ResourceID: req.ResourceID,
  			Resource:   resourceType,
  			UserType:   userType,
  		}
  
  		opts := platform.FindOptions{}
  		mappings, _, err := s.FindUserResourceMappings(ctx, filter)
  		if err != nil {
  			EncodeError(ctx, err, w)
  			return
  		}
  
  		users := make([]*platform.User, 0, len(mappings))
  		for _, m := range mappings {
  			user, err := userService.FindUserByID(ctx, m.UserID)
  			if err != nil {
  				EncodeError(ctx, err, w)
  				return
  			}
  
  			users = append(users, user)
  		}
  
  		if err := encodeResponse(ctx, w, http.StatusOK, newResourceUsersResponse(opts, filter, users)); err != nil {
  			EncodeError(ctx, err, w)
  			return
  		}
  	}
  }
docs: // newGetMembersHandler returns a handler func for a GET to /members or /owners endpoints