aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/note_fragment.php10
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