diff options
Diffstat (limited to 'tinydns-controller.lua')
-rw-r--r-- | tinydns-controller.lua | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tinydns-controller.lua b/tinydns-controller.lua index 502af03..47bb8d7 100644 --- a/tinydns-controller.lua +++ b/tinydns-controller.lua @@ -1,20 +1,17 @@ module(..., package.seeall) +-- Set variables local newrecordtxt = "[New]" +-- ################################################################################ +-- LOCAL FUNCTIONS + 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 - local function getstatus(self) local status = self.model.getstatus() if (#status.status.value > 0) then @@ -76,6 +73,13 @@ end -- ################################################################################ -- PUBLIC FUNCTIONS +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) local config = {} config.settings = {} |