aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/note.php
diff options
context:
space:
mode:
authorwinter2024-12-06 20:43:26 +0000
committerwinter2024-12-06 20:43:26 +0000
commite1ad307b531c27ec6bfaf8b4d018991b0d4a78f3 (patch)
tree4ef08af2b4051d433bb929d5162474ac6777cab1 /routes/note.php
initial commit
hardcoded functionality mostly!
Diffstat (limited to 'routes/note.php')
-rw-r--r--routes/note.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/routes/note.php b/routes/note.php
new file mode 100644
index 0000000..9c5e507
--- /dev/null
+++ b/routes/note.php
@@ -0,0 +1,20 @@
+<?php
+
+use WpfTest\Router;
+
+Router::getInstance()->mount('/post/:id', function (array $args) {
+ json_response([
+ 'type' => 'note',
+ 'self' => path_to_uri('/post/' . $args['id']),
+ 'created' => '2024-12-06T20:14:00+00:00',
+ 'author' => path_to_uri('/user/winter'),
+ 'plainContent' => 'meow :3',
+ 'language' => 'eng',
+ 'inReplyTo' => null,
+ 'threadApex' => path_to_uri('/post/' . $args['id']),
+ 'privacy' => [
+ 'scope' => 'public',
+ 'indexable' => true
+ ]
+ ]);
+});