def get_endpoints_from_query_string(query_string): if "," in query_string: repo_ids = query_string.split(",") else: repo_ids = [query_string] repos = repository.get_repos_by_ids(repo_ids) endpoints = [] for repo in repos: for endpoint in repo.endpoints: endpoints.append(endpoint) return endpoints