summaryrefslogtreecommitdiffstats
path: root/hostname-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'hostname-controller.lua')
-rw-r--r--hostname-controller.lua20
1 files changed, 5 insertions, 15 deletions
diff --git a/hostname-controller.lua b/hostname-controller.lua
index 3164ac6..10ab81c 100644
--- a/hostname-controller.lua
+++ b/hostname-controller.lua
@@ -1,24 +1,14 @@
-- the hostname controller
-
module (..., package.seeall)
--- Public methods
--- <prefix>/hostname/get
+require("controllerfunctions")
default_action = "read"
-read = function (self )
- return self.model:get()
-end
-
-update = function (self)
- return self.model:set(cfe({value=self.clientdata.hostname}))
+read = function(self)
+ return self.model.get()
end
---[[
-delete = function (self)
- return ({hostname = self.model:set(cfe({value=""}))})
+edit = function(self)
+ return controllerfunctions.handle_form(self, self.model.read_name, self.model.update_name, self.clientdata, "Save", "Edit Hostname", "Hostname Set")
end
-
-create = update
---]]