summaryrefslogtreecommitdiff
path: root/src/web/_controller/bucket.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-05-24 09:05:42 -0400
committerFreya Murphy <freya@freyacat.org>2024-05-24 09:05:42 -0400
commitc5f39ea2cd7cf02246705ea8872d3b350526165c (patch)
tree2694f9fdc5d83b529a01f2997c1d89c271c86592 /src/web/_controller/bucket.php
downloadwebsite-c5f39ea2cd7cf02246705ea8872d3b350526165c.tar.gz
website-c5f39ea2cd7cf02246705ea8872d3b350526165c.tar.bz2
website-c5f39ea2cd7cf02246705ea8872d3b350526165c.zip
initial
Diffstat (limited to 'src/web/_controller/bucket.php')
-rw-r--r--src/web/_controller/bucket.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/web/_controller/bucket.php b/src/web/_controller/bucket.php
new file mode 100644
index 0000000..ed15ef8
--- /dev/null
+++ b/src/web/_controller/bucket.php
@@ -0,0 +1,22 @@
+<?php /* Copyright (c) 2024 Freya Murphy */
+class Bucket_controller extends Controller {
+
+ private $bucket_model;
+
+ function __construct($load) {
+ parent::__construct($load);
+ $this->bucket_model = $this->load->model('bucket');
+ }
+
+ public function index(): void {
+ parent::index();
+ $data = $this->bucket_model->get_data();
+ if ($data === NULL) {
+ $this->error(400);
+ return;
+ }
+ $this->view('apps/bucket', $data);
+ }
+}
+
+?>