summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--squid-controller.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/squid-controller.lua b/squid-controller.lua
index 6f69caa..ebc6133 100644
--- a/squid-controller.lua
+++ b/squid-controller.lua
@@ -7,17 +7,13 @@ default_action = "basic"
dep = function( self )
if self.model.dependancy_ok() then
- self.conf.type = "redir"
- self.conf.action = "basic"
- error(self.conf)
+ redirect(self)
end
if self.clientdata.cmd then
if self.clientdata.cmd == "create file" then
self.model.create_cfg_from_template()
- self.conf.type = "redir"
- self.conf.action = "basic"
- error(self.conf)
+ redirect(self)
end
end
@@ -36,9 +32,7 @@ basic = function( self )
}
if not self.model.dependancy_ok() then
- self.conf.type = "redir"
- self.conf.action = "dep"
- error(self.conf)
+ redirect(self, "dep")
end
local service = { message="", status="", error="" }