feat: user analysis endpoint
This commit is contained in:
@@ -79,6 +79,19 @@ def get_time_analysis():
|
||||
print(traceback.format_exc())
|
||||
return jsonify({"error": f"An unexpected error occurred: {str(e)}"}), 500
|
||||
|
||||
@app.route("/stats/user", methods=["GET"])
|
||||
def get_user_analysis():
|
||||
if stat_obj is None:
|
||||
return jsonify({"error": "No data uploaded"}), 400
|
||||
|
||||
try:
|
||||
return jsonify(stat_obj.user_analysis()), 200
|
||||
except ValueError as e:
|
||||
return jsonify({"error": f"Malformed or missing data: {str(e)}"}), 400
|
||||
except Exception as e:
|
||||
print(traceback.format_exc())
|
||||
return jsonify({"error": f"An unexpected error occurred: {str(e)}"}), 500
|
||||
|
||||
@app.route('/filter/search', methods=["POST"])
|
||||
def search_dataset():
|
||||
if stat_obj is None:
|
||||
|
||||
Reference in New Issue
Block a user