aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/note_fragment.php
blob: ef2e7b0977146c33bf046bad10b4314534f23ec4 (plain)
1
2
3
4
5
6
7
8
9
10
<?php

use Digitigrade\Model\Note;
use Digitigrade\Router;

Router::getInstance()->mount('/fragment/note/:id/:action', function (array $args) {
    $note = Note::find($args['id']);
    // TODO: actually like/dislike/reshare the note as the currently signed in user
    render_template('interaction_button', ['action' => $args['action'], 'active' => true, 'note' => $note]);
});