Closed max-legrand closed 3 years ago
Hi! Could you share what your query
value looks like?
Yep!
I also tried with a blank query and that also kicked back with the same error. For reference, when I just use standard POST requests it seems to work (e.g. via Postman generated Go code)
Also this is the contents of truePointer:
Thanks for the detailed feedback! There was a bug where the various search filter fields were not being omitted from JSON, because they were struct values instead of struct pointers. Fixed in v0.1.1. Note: The fix is a breaking change; you'll have to update your code, e.g. to this:
query := notion.DatabaseQuery{
Filter: notion.DatabaseQueryFilter{
And: []notion.DatabaseQueryFilter{
{
Property: "Done",
Checkbox: ¬ion.CheckboxDatabaseQueryFilter{
Equals: notion.BoolPtr(true),
},
},
{
Property: "Repeat",
Select: ¬ion.SelectDatabaseQueryFilter{
IsNotEmpty: true,
},
},
{
Property: "Date",
Date: ¬ion.DateDatabaseQueryFilter{
IsNotEmpty: true,
},
},
},
},
}
Awesome thank you so much for the super fast assistance!
When the following line executes, it returns back stating an error with code 500 occurs.
response, err := client.QueryDatabase(context.Background(), id, query)
I'm not particularly sure where the issue is arising, so any help resolving is appreciated!