aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/actor.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/actor.php b/routes/actor.php
index a459640..7bf0250 100644
--- a/routes/actor.php
+++ b/routes/actor.php
@@ -163,7 +163,7 @@ Router::getInstance()->mount('/actor/:id/poke', function (array $args) {
if ($initiator == null) {
throw new Unauthorized('please authenticate yourself on behalf of the initiating actor');
}
- $body = file_get_contents('php://input');
- $obj = json_decode($body);
- $initiator->poke($target, PokeVerb::tryFrom($obj?->verb ?? '') ?? PokeVerb::POKE, $obj?->urgent ?? false);
+ $verb = PokeVerb::tryFrom($_POST['verb'] ?? '') ?? PokeVerb::POKE;
+ $urgent = isset($_POST['urgent']);
+ $initiator->poke($target, $verb, $urgent);
}); \ No newline at end of file