summaryrefslogtreecommitdiffstats
path: root/gnats-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'gnats-controller.lua')
-rw-r--r--gnats-controller.lua20
1 files changed, 3 insertions, 17 deletions
diff --git a/gnats-controller.lua b/gnats-controller.lua
index d5926ba..03df468 100644
--- a/gnats-controller.lua
+++ b/gnats-controller.lua
@@ -98,23 +98,9 @@ local descr = {
}
-- ################################################################################
--- LOCAL FUNCTIONS
-
-local function list_redir(self)
- self.conf.action = "status"
- self.conf.type = "redir"
- error (self.conf)
-end
-
-
--- ################################################################################
-- PUBLIC FUNCTIONS
-mvc = {}
-function mvc.on_load(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
+
+default_action = "status"
function status(self)
return { status=self.model.getstatus() }
@@ -265,7 +251,7 @@ function queryresult(self)
if (tonumber(pr_id)) then
query.header, query.sfields, query.mfields = self.model:read_pr(pr_id)
else
- list_redir(self)
+ redirect(self)
end
local myform = query.header