From a172c1f58af5dffb3abe00d3b64b8743d02bec68 Mon Sep 17 00:00:00 2001 From: "Fafner [_KeyZee_]" Date: Tue, 24 Nov 2020 16:46:57 +0100 Subject: [PATCH] adding a new api entry: stats --- website/web/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/web/__init__.py b/website/web/__init__.py index 60372ed8..9b19c742 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -674,3 +674,9 @@ def json_hostname_info(): to_query = request.get_json(force=True) occurrences = lookyloo.get_hostname_occurrences(**to_query) return jsonify(occurrences) + + +@app.route('/json/stats', methods=['GET']) +def json_stats(): + to_return=lookyloo.get_stats() + return jsonify(to_return)