Diff

mod_rest/example/app.py @ 3854:25c34c9f755c

mod_rest: Add mapping of XEP-0092: Software Version
author Kim Alvefur <zash@zash.se>
date Sat, 25 Jan 2020 00:40:38 +0100
parent 3853:fb29d7cd698b
child 3861:ede3d1724dd1
line wrap: on
line diff
--- a/mod_rest/example/app.py	Sat Jan 25 00:37:06 2020 +0100
+++ b/mod_rest/example/app.py	Sat Jan 25 00:40:38 2020 +0100
@@ -44,6 +44,9 @@
                     {"items": [{"jid": "example.org", "name": "Example Dot Org"}]}
                 )
 
+            elif "version" in data:
+                return jsonify({"version": {"name": "app.py", "version": "0"}})
+
     return Response(status=501)