From c9df259c250025fe070c9a224094c44c322f9097 Mon Sep 17 00:00:00 2001 From: John Giannelos Date: Tue, 26 Nov 2019 16:03:26 +0100 Subject: [PATCH] Remove unused flask views --- README.md | 2 +- webcompat_search/views.py | 24 ------------------------ 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/README.md b/README.md index ffed9dd..70bb547 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ webcompat-search Description ------------- -Web service to expose HTTP API that allows searching webcompat issues based on: +Utility to help with common tasks related to webcompat ES: * flask * elasticsearch diff --git a/webcompat_search/views.py b/webcompat_search/views.py index c6d0f8b..fb4979a 100644 --- a/webcompat_search/views.py +++ b/webcompat_search/views.py @@ -5,7 +5,6 @@ from flask import Blueprint, url_for from flask.json import jsonify from elasticsearch import Elasticsearch -from elasticsearch.helpers import scan as es_scan from webcompat_search import settings @@ -33,29 +32,6 @@ def get_schema(): return jsonify(schema) -@blueprint.route("/domain/") -def get_domain(domain): - """Query for issues based on domain""" - - es = Elasticsearch([settings.ES_URL], **settings.ES_KWARGS) - query = {"query": {"term": {"parsed_url.netloc.keyword": domain}}} - - results = es_scan( - es, - index=settings.ES_WEBCOMPAT_INDEX, - query=query, - scroll=settings.ES_SCROLL_LIMIT, - size=settings.ES_QUERY_SIZE, - preserve_order=True, - ) - - docs = [] - for result in results: - docs.append(result["_source"]) - - return jsonify(results=docs) - - @blueprint.route("/dashboards/") def get_dashboards(): """Return list of available dashboards"""