summaryrefslogtreecommitdiffstats
path: root/kamailio-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'kamailio-controller.lua')
-rw-r--r--kamailio-controller.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/kamailio-controller.lua b/kamailio-controller.lua
index a4bff67..69d3d1d 100644
--- a/kamailio-controller.lua
+++ b/kamailio-controller.lua
@@ -36,3 +36,24 @@ end
function updateuser(self)
return controllerfunctions.handle_form(self, function() return self.model.get_user(self.clientdata.username) end, self.model.update_user, self.clientdata, "Update", "Update User")
end
+
+function listtables(self)
+ return self.model.list_tables()
+end
+
+function viewtable(self)
+ return self.model.list_table_entries(self.clientdata.table)
+end
+
+function deletetableentry(self)
+ return self:redirect_to_referrer(self.model.delete_table_entry(self.clientdata.table, self.clientdata.id))
+end
+
+function updatetableentry(self)
+ return controllerfunctions.handle_form(self, function() return self.model.get_table_entry(self.clientdata.table, self.clientdata.id) end, self.model.update_table_entry, self.clientdata, "Update", "Update Table Entry", "Entry updated")
+end
+
+function createtableentry(self)
+ return controllerfunctions.handle_form(self, function() return self.model.get_table_entry(self.clientdata.table) end, self.model.create_table_entry, self.clientdata, "Create", "Create New Table Entry", "Entry created")
+end
+