summaryrefslogtreecommitdiffstats
path: root/logfiles-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'logfiles-controller.lua')
-rw-r--r--logfiles-controller.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/logfiles-controller.lua b/logfiles-controller.lua
index cea287c..b6f81d7 100644
--- a/logfiles-controller.lua
+++ b/logfiles-controller.lua
@@ -22,10 +22,6 @@ read = function (self )
return ({logfile = self.model:get(), url = ENV["SCRIPT_NAME"] .. self.conf.prefix .. self.conf.controller} )
end
---update = function (self)
--- return nil
---end
-
delete = function (self)
local filetodelete = self.clientdata.name or ""
return ({deletedfile = self.model:delete(filetodelete)} )
@@ -33,8 +29,12 @@ end
view = function (self)
local filetoview = self.clientdata.name or ""
- return ({logfile = self.model:view(filetoview)} )
+ local content = ({logfile = self.model:view(filetoview)} )
+ if content.logfile.name == "" then
+ list_redir(self)
+ else
+ return content
+ end
end
download = view
---create = update