Skip to content

Commit

Permalink
fix: support drafts
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Jan 13, 2022
1 parent eb26618 commit 8e07b5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
return new Response('Invalid Image Url', 'text/plain', 500);
}

$page = page(str_replace(['/pages/', '+'], ['/', '/'], $formData['pageId']));
$page = kirby()->page(str_replace(['/pages/', '+'], ['/', '/'], $formData['pageId']));

if (is_null($page)) {
return new Response('Page Not Found', 'text/plain', 404);
Expand Down

0 comments on commit 8e07b5e

Please sign in to comment.