Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Search all pages with Query::all() is not working correctly #210

Closed
rickyheijnen opened this issue Apr 26, 2023 · 1 comment · Fixed by #211
Closed

[BUG] Search all pages with Query::all() is not working correctly #210

rickyheijnen opened this issue Apr 26, 2023 · 1 comment · Fixed by #211
Labels
bug Something isn't working

Comments

@rickyheijnen
Copy link

Describe the bug
Search all pages is not working because the array is not correctly formatted as object ( { } ), but as a array ( [ ] ).

The response from the Notion API is:
body failed validation: body should be an object, instead was [].

Expected behavior
Show a list of all pages

Code snippet

<?
$notion = Notion::create("access_code");
$query = Query::all();
$notion->search()->search($query);
?>

Environment:

  • SDK Version v1.6.2
@rickyheijnen rickyheijnen added the bug Something isn't working label Apr 26, 2023
@rickyheijnen rickyheijnen changed the title [BUG] [BUG] Search all pages with Query::all() is not working correctly Apr 26, 2023
@mariosimao mariosimao linked a pull request Apr 26, 2023 that will close this issue
mariosimao added a commit that referenced this issue Apr 26, 2023
@mariosimao
Copy link
Owner

Hi @rickyheijnen, thanks for reporting this bug!

I have fixed it and released a new version of the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants