I don't know why, but in vercel I don't get docs from a query but in localhost I do.
And i have another similar collection, and similar queries and I get docs in local and the domain. Does anyone have an idea of why?
This is the query, I get docs in local, but not in vercel
const { data } = await axios.get('/communityMembers', {
params: {
where: {
and: [
{
community: {
equals: {
value: communityId,
relationTo: 'community',
},
},
},
{
member: {
equals: userId,
},
},
],
},
},
});
In other collection I use this other query and works in vercel and local:
const { data } = await axios.get('/visits', {
params: {
where: {
and: [
{
activity: {
equals: {
value: activityId,
relationTo: 'activities',
},
},
},
{
attendee: {
equals: userId,
},
},
],
},
},
});
I deploy the project in digital ocean and the query for
communityMembers
works fine đź« . I really have no idea of why is not working in Vercel
do you get a response at all? does your axios fn throw an error?
yes, but without docs :/
I have a similar request in another page that works
The weird things:
- Works in other similar collection / req
- Works in local but not in vercel
- Works in digitalocean app but not in vercel đź«