diff --git a/workshop-1/app/like-service/service/mysfits_like.py b/workshop-1/app/like-service/service/mysfits_like.py index d40fda4..fa374cc 100644 --- a/workshop-1/app/like-service/service/mysfits_like.py +++ b/workshop-1/app/like-service/service/mysfits_like.py @@ -14,7 +14,11 @@ # sent to the service root will receive a healthy response. @app.route("/") def health_check_response(): - return jsonify({"message" : "Nothing here, used for health check."}) + flaskResponse = Response(response='{"message" : "Nothing here, used for health check. Try /mysfits instead."}', status=200) + flaskResponse.headers["Content-Type"] = "application/json" + + return flaskResponse + # indicate that the provided mysfit should be marked as liked. def process_like_request(): diff --git a/workshop-1/app/monolith-service/service/mythicalMysfitsService.py b/workshop-1/app/monolith-service/service/mythicalMysfitsService.py index d362bf6..757c4ec 100644 --- a/workshop-1/app/monolith-service/service/mythicalMysfitsService.py +++ b/workshop-1/app/monolith-service/service/mythicalMysfitsService.py @@ -13,7 +13,10 @@ # sent to the service root will receive a healthy response. @app.route("/") def healthCheckResponse(): - return jsonify({"message" : "Nothing here, used for health check. Try /mysfits instead."}) + flaskResponse = Response(response='{"message" : "Nothing here, used for health check. Try /mysfits instead."}', status=200) + flaskResponse.headers["Content-Type"] = "application/json" + + return flaskResponse # Retrive mysfits from DynamoDB based on provided querystring params, or all # mysfits if no querystring is present. diff --git a/workshop-2/app/like-service/service/mysfits_like.py b/workshop-2/app/like-service/service/mysfits_like.py index a18bfb9..994913b 100644 --- a/workshop-2/app/like-service/service/mysfits_like.py +++ b/workshop-2/app/like-service/service/mysfits_like.py @@ -11,7 +11,10 @@ # sent to the service root will receive a healthy response. @app.route("/") def health_check_response(): - return jsonify({"message" : "Nothing here, used for health check."}) + flaskResponse = Response(response='{"message" : "Nothing here, used for health check. Try /mysfits instead."}', status=200) + flaskResponse.headers["Content-Type"] = "application/json" + + return flaskResponse # indicate that the provided mysfit should be marked as liked. def process_like_request(): diff --git a/workshop-2/app/monolith-service/service/mythicalMysfitsService.py b/workshop-2/app/monolith-service/service/mythicalMysfitsService.py index ae19fa2..a4bb21a 100644 --- a/workshop-2/app/monolith-service/service/mythicalMysfitsService.py +++ b/workshop-2/app/monolith-service/service/mythicalMysfitsService.py @@ -10,7 +10,10 @@ # sent to the service root will receive a healthy response. @app.route("/") def healthCheckResponse(): - return jsonify({"message" : "Nothing here, used for health check. Try /mysfits instead."}) + flaskResponse = Response(response='{"message" : "Nothing here, used for health check. Try /mysfits instead."}', status=200) + flaskResponse.headers["Content-Type"] = "application/json" + + return flaskResponse # Retrive mysfits from DynamoDB based on provided querystring params, or all # mysfits if no querystring is present. diff --git a/workshop-3/app/monolith-service/service/mythicalMysfitsService.py b/workshop-3/app/monolith-service/service/mythicalMysfitsService.py index 34fedbf..d28fdbb 100755 --- a/workshop-3/app/monolith-service/service/mythicalMysfitsService.py +++ b/workshop-3/app/monolith-service/service/mythicalMysfitsService.py @@ -10,7 +10,10 @@ # sent to the service root will receive a healthy response. @app.route("/") def healthCheckResponse(): - return jsonify({"message" : "Nothing here, used for health check. Try /mysfits instead."}) + flaskResponse = Response(response='{"message" : "Nothing here, used for health check. Try /mysfits instead."}', status=200) + flaskResponse.headers["Content-Type"] = "application/json" + + return flaskResponse # Retrive mysfits from DynamoDB based on provided querystring params, or all # mysfits if no querystring is present.