aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/public_timelines.php
diff options
context:
space:
mode:
Diffstat (limited to 'routes/public_timelines.php')
-rw-r--r--routes/public_timelines.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/routes/public_timelines.php b/routes/public_timelines.php
new file mode 100644
index 0000000..2d40328
--- /dev/null
+++ b/routes/public_timelines.php
@@ -0,0 +1,15 @@
+<?php
+
+use Digitigrade\Router;
+use Digitigrade\Timeline\GlobalTimeline;
+use Digitigrade\Timeline\LocalTimeline;
+
+Router::getInstance()->mount('/feed/global', function (array $args) {
+ $notes = (new GlobalTimeline())->getNotes();
+ render_template('global_timeline', ['notes' => $notes]);
+});
+
+Router::getInstance()->mount('/feed/local', function (array $args) {
+ $notes = (new LocalTimeline())->getNotes();
+ render_template('local_timeline', ['notes' => $notes]);
+}); \ No newline at end of file