'api-minify' -> 'rest-api-minify' and make it settable from !botset

This commit is contained in:
jesopo 2018-11-12 18:15:08 +00:00
parent a0e86f79c3
commit eb215d61a1

View file

@ -39,7 +39,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
code = 500
if not event_response == None:
if _bot.get_setting("api-minify", False):
if _bot.get_setting("rest-api-minify", False):
response = json.dumps(event_response,
sort_keys=True, separators=(",", ":"))
else:
@ -81,6 +81,9 @@ class Handler(http.server.BaseHTTPRequestHandler):
@utils.export("botset", {"setting": "rest-api",
"help": "Enable/disable REST API",
"validate": utils.bool_or_none})
@utils.export("botset", {"setting": "rest-api-minify",
"help": "Enable/disable REST API minifying",
"validate": utils.bool_or_none})
class Module(ModuleManager.BaseModule):
def on_load(self):
global _bot