diff options
| author | winter | 2024-12-24 00:33:02 +0000 |
|---|---|---|
| committer | winter | 2024-12-24 00:58:14 +0000 |
| commit | ef16890f38bd4256da1b873a89dfadc5067d63a9 (patch) | |
| tree | 732180bfc74e2dc987c76f7969a447eb3b6e564d /routes | |
| parent | e7e237dacaf7bbaa739c7e9a430958aed09aa647 (diff) | |
hook up the interaction buttons to a dummy thing
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/note_fragment.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/routes/note_fragment.php b/routes/note_fragment.php new file mode 100644 index 0000000..ef2e7b0 --- /dev/null +++ b/routes/note_fragment.php @@ -0,0 +1,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]); +});
\ No newline at end of file |
