aboutsummaryrefslogtreecommitdiff
path: root/controllers/list.php
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/list.php')
-rw-r--r--controllers/list.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/controllers/list.php b/controllers/list.php
new file mode 100644
index 0000000..0ec33d1
--- /dev/null
+++ b/controllers/list.php
@@ -0,0 +1,17 @@
+<?php
+namespace Controller;
+use Database;
+use Exception;
+
+function on_post() {
+ global $list_status;
+ $list_status = "";
+
+ try {
+ $uid = Database\Cookie::fromDB($_POST['token'])->UID;
+ Database\ArchiveList::create($uid, $_POST["name"], $_POST["description"]);
+ }
+ catch(Exception $e) {
+ $list_status = $e;
+ }
+}