diff options
Diffstat (limited to 'server.py')
-rw-r--r-- | server.py | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |