aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2018-11-12 18:15:08 +0000
committerGravatar jesopo2018-11-12 18:15:08 +0000
commiteb215d61a1e3e3b1e2a5626fe8b3e68ea5c09bf1 (patch)
tree05db88c5f5358d0cc8609341641ce5b7d5c6175e /modules
parentChange API key checking on-request to match what the values should be in the (diff)
signature
'api-minify' -> 'rest-api-minify' and make it settable from !botset
Diffstat (limited to 'modules')
-rw-r--r--modules/rest_api.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/rest_api.py b/modules/rest_api.py
index b4c35565..695d1193 100644
--- a/modules/rest_api.py
+++ b/modules/rest_api.py
@@ -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