aboutsummaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2025-01-26 18:53:18 +0200
committerSyndamia <kamen@syndamia.com>2025-01-26 22:21:31 +0200
commit77708ef5b9559e6598f5acf7d2b30dbdbd037d81 (patch)
tree88b28f7dd4464537138cc5c7b2fce27013117155 /controllers
parent18677f1e23ac097d859cde1030ce6149585f5574 (diff)
downloadnowayforward_human-77708ef5b9559e6598f5acf7d2b30dbdbd037d81.tar
nowayforward_human-77708ef5b9559e6598f5acf7d2b30dbdbd037d81.tar.gz
nowayforward_human-77708ef5b9559e6598f5acf7d2b30dbdbd037d81.zip
feat: Create page for creating lists
Diffstat (limited to 'controllers')
-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;
+ }
+}