summaryrefslogtreecommitdiffstats
path: root/syslog-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'syslog-controller.lua')
-rw-r--r--syslog-controller.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/syslog-controller.lua b/syslog-controller.lua
index 288ae7b..77cd0ab 100644
--- a/syslog-controller.lua
+++ b/syslog-controller.lua
@@ -1,9 +1,17 @@
module(..., package.seeall)
-mvc = {}
-function mvc.on_load(self)
+local list_redir = function (self)
+ self.conf.action = "status"
+ self.conf.type = "redir"
+ error (self.conf)
end
+mvc = {}
+mvc.on_load = function(self, parent)
+ if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then
+ self.worker[self.conf.action] = list_redir(self)
+ end
+end
function status(self)
return { status=self.model.getstatus() }