aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'libpathod/app.py')
-rw-r--r--libpathod/app.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpathod/app.py b/libpathod/app.py
index 7059f9ba..ca24c62c 100644
--- a/libpathod/app.py
+++ b/libpathod/app.py
@@ -12,6 +12,12 @@ class APILog(tornado.web.RequestHandler):
)
+class APILogClear(tornado.web.RequestHandler):
+ def post(self):
+ self.application.clear_log()
+ self.write("OK")
+
+
class _Page(tornado.web.RequestHandler):
def render(self, name, **kwargs):
tornado.web.RequestHandler.render(self, name + ".html", **kwargs)
@@ -129,6 +135,7 @@ class PathodApp(tornado.web.Application):
(r"/help", Help),
(r"/preview", Preview),
(r"/api/log", APILog),
+ (r"/api/log/clear", APILogClear),
(r"/p/.*", RequestPathod, settings),
],
static_path = utils.data.path("static"),