From 4671b9307c14380214ac2f706fc0575326922481 Mon Sep 17 00:00:00 2001 From: Sebastian Steiner Date: Tue, 11 Dec 2018 14:20:18 +0100 Subject: [PATCH] commented code removed, removed http status and content-type from return --- service-analysis/sentiment_analysis.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/service-analysis/sentiment_analysis.py b/service-analysis/sentiment_analysis.py index 7b449d2..2a013e9 100644 --- a/service-analysis/sentiment_analysis.py +++ b/service-analysis/sentiment_analysis.py @@ -34,11 +34,7 @@ class Sentiment_Analysis(Resource): return make_error(503, message=service_error_503) sentiment = value/len(text_array) data = {'sentiment': sentiment} - return data, 200, {'Content-Type': 'application/json'} - #r = Response(response=json.dumps(data), status=200, mimetype="application/json") - #r.headers["Content-Type"] = "application/json" - #return r - #return output_json(json.dumps(data), 200, headers={'Content-Type': "application/json"}) + return data api.add_resource(Sentiment_Analysis, '/') -- 2.43.0