aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/public_timelines.php
blob: 2d4032876328afb067f3ea665ebd216df38bd04b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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]);
});