Skip to content

Commit

Permalink
improvement: send appropriate responses
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Dec 18, 2021
1 parent 64b32a2 commit dc133d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
$webmention = [];

if ($response->secret !== option('mauricerenck.indieConnector.secret')) {
return 'PAGE NOT FOUND'; // FIXME forbidden, use kirby return status
return new Response('Not found', 'text/plain', 404);
}

$targetPage = $receiver->getPageFromUrl($response->post->{'wm-target'});
if (is_null($targetPage)) {
return 'PAGE NOT FOUND'; // FIXME use kirby return status
return new Response('Not found', 'text/plain', 404);
}

$webmention['type'] = $receiver->getWebmentionType($response->post->{'wm-property'});
Expand Down

0 comments on commit dc133d6

Please sign in to comment.