diff options
| author | winter | 2025-03-24 19:19:11 +0000 |
|---|---|---|
| committer | winter | 2025-03-24 19:19:11 +0000 |
| commit | 0a83d6a3f27b90355d450ce6b8390303c169a47f (patch) | |
| tree | 33a520b6a064c62dd86a047c02a61211938c094e /routes/actor.php | |
| parent | 6d06ec92a35b8d38c24f246944d40431e8ec6f4f (diff) | |
[breaking] change poke extension to use form-urlencoded instead of json
https://pawpub.entities.org.uk/extension/poke?do=diff&rev2%5B0%5D=1742657519&rev2%5B1%5D=1742841374&difftype=sidebyside
Diffstat (limited to 'routes/actor.php')
| -rw-r--r-- | routes/actor.php | 6 |
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 |
