System Information
- Strapi Version:
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
Hi, all.
I have created a search based on multiple params
export async function getServerSideProps({ query: searchTerm }) {
const query = qs.stringify(
{
filters: {
$or: [
{
name: {
$contains: searchTerm,
},
},
{
venue: {
$contains: searchTerm,
},
},
{
performers: {
$contains: searchTerm,
},
},
],
},
},
{
// encodeValuesOnly: true, // prettify URL
}
);
const res = await fetch(`${API_URL}/api/events?filters${query}`);
console.log(query);
const events = await res.json();
return {
props: { events },
};
}
For my search with multiple params, above, I get an error (500)
However, If I run this search with a single param in insomnia I get a return value based on the search term
http://localhost:1337/api/events?filters[name][$contains]=man
Can anyone see anything wrong with my multi-search params query? I have followed the documentation so not too sure why it is bringing back nothing.