# HG changeset patch # User Kim Alvefur # Date 1605451312 -3600 # Node ID f3fbfde9683d3988cb0260077c4d43b917c561bc # Parent 1f93fa24611d033a7b0a341012c60f586088ec21 mod_rest/example: Reorder things to match the disco#info feature order Satisfies my OCD! diff -r 1f93fa24611d -r f3fbfde9683d mod_rest/example/app.py --- a/mod_rest/example/app.py Sun Nov 15 15:33:56 2020 +0100 +++ b/mod_rest/example/app.py Sun Nov 15 15:41:52 2020 +0100 @@ -31,11 +31,7 @@ return jsonify({"body": "Yes this is flask app"}) elif data["kind"] == "iq" and data["type"] == "get": - if "ping" in data: - # Respond to ping - return Response(status=204) - - elif "disco" in data: + if "disco" in data: # Return supported features return jsonify( { @@ -67,6 +63,10 @@ # Version info return jsonify({"version": {"name": "app.py", "version": "0"}}) + elif "ping" in data: + # Respond to ping + return Response(status=204) + return Response(status=501)