'api-minify' -> 'rest-api-minify' and make it settable from !botset
This commit is contained in:
parent
a0e86f79c3
commit
eb215d61a1
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue