aboutsummaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'server.py')
-rw-r--r--server.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/server.py b/server.py
index 9544ad2..c40640a 100644
--- a/server.py
+++ b/server.py
@@ -26,7 +26,7 @@ try:
app_config.update(json.load(_conf))
except FileNotFoundError:
with open("config.json", "w") as _conf:
- json.dump(app_config, _conf)
+ json.dump(app_config, _conf, indent=2)
def api_method(function):
@@ -186,6 +186,16 @@ class API(object):
"""
@api_method
+ def instance_info(self, args, database, user, **kwargs):
+ """
+ Return configuration info for this running instance of the BBJ server.
+ """
+ return {
+ "allow_anon": app_config["allow_anon"],
+ "instance_name": app_config["instance_name"]
+ }
+
+ @api_method
def user_register(self, args, database, user, **kwargs):
"""
Register a new user into the system and return the new user object
Un proyecto texto-plano.xyz